From 36f5580be1dde43eb94ce4d58bc20e493be09f09 Mon Sep 17 00:00:00 2001 From: Bob Peterson Date: Wed, 11 Apr 2012 12:59:32 -0400 Subject: GFS2: Use slab for block reservation memory This patch changes block reservations so it uses slab storage. Signed-off-by: Bob Peterson Signed-off-by: Steven Whitehouse --- fs/gfs2/main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'fs/gfs2/main.c') 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); -- cgit v1.1