summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/main.c
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2012-04-11 12:59:32 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2012-04-24 16:44:29 +0100
commit36f5580be1dde43eb94ce4d58bc20e493be09f09 (patch)
tree5d8c2ce2b52d4ac806d04611b829e394b4365969 /fs/gfs2/main.c
parentb120193e360f6c22b0c9424c928f2df40ba0ffdb (diff)
downloadop-kernel-dev-36f5580be1dde43eb94ce4d58bc20e493be09f09.zip
op-kernel-dev-36f5580be1dde43eb94ce4d58bc20e493be09f09.tar.gz
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.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/gfs2/main.c b/fs/gfs2/main.c
index 754426b..ce17944 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);
OpenPOWER on IntegriCloud