diff options
author | Bob Peterson <rpeterso@redhat.com> | 2012-04-11 18:59:32 +0200 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2012-04-24 17:44:29 +0200 |
commit | 36f5580be1dde43eb94ce4d58bc20e493be09f09 (patch) | |
tree | 5d8c2ce2b52d4ac806d04611b829e394b4365969 /fs/gfs2/main.c | |
parent | GFS2: make function gfs2_page_add_databufs static (diff) | |
download | linux-36f5580be1dde43eb94ce4d58bc20e493be09f09.tar.xz linux-36f5580be1dde43eb94ce4d58bc20e493be09f09.zip |
GFS2: Use slab for block reservation memory
This patch changes block reservations so it uses slab storage.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/main.c')
-rw-r--r-- | fs/gfs2/main.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/gfs2/main.c b/fs/gfs2/main.c index 754426b1e52c..ce1794428ee4 100644 --- a/fs/gfs2/main.c +++ b/fs/gfs2/main.c @@ -143,6 +143,12 @@ static int __init init_gfs2_fs(void) if (!gfs2_quotad_cachep) goto fail; + gfs2_rsrv_cachep = kmem_cache_create("gfs2_mblk", + sizeof(struct gfs2_blkreserv), + 0, 0, NULL); + if (!gfs2_rsrv_cachep) + goto fail; + register_shrinker(&qd_shrinker); error = register_filesystem(&gfs2_fs_type); @@ -186,6 +192,9 @@ fail: unregister_shrinker(&qd_shrinker); gfs2_glock_exit(); + if (gfs2_rsrv_cachep) + kmem_cache_destroy(gfs2_rsrv_cachep); + if (gfs2_quotad_cachep) kmem_cache_destroy(gfs2_quotad_cachep); @@ -226,6 +235,7 @@ static void __exit exit_gfs2_fs(void) rcu_barrier(); mempool_destroy(gfs2_bh_pool); + kmem_cache_destroy(gfs2_rsrv_cachep); kmem_cache_destroy(gfs2_quotad_cachep); kmem_cache_destroy(gfs2_rgrpd_cachep); kmem_cache_destroy(gfs2_bufdata_cachep); |