summaryrefslogtreecommitdiff
path: root/fs/gfs2/ops_fstype.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-09-07 14:40:21 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-09-07 14:40:21 -0400
commit85d1da67f7e1239afa3494d05be87da6fc3ecada (patch)
tree01508570249764d8b0e38183e1ea7e9666b34b78 /fs/gfs2/ops_fstype.c
parentb8547856f9c158ff70effbcfd15969c908fbe1b3 (diff)
[GFS2] Move glock hash table out of superblock
There are several reasons why we want to do this: - Firstly its large and thus we'll scale better with multiple GFS2 fs mounted at the same time - Secondly its easier to scale its size as required (thats a plan for later patches) - Thirdly, we can use kzalloc rather than vmalloc when allocating the superblock (its now only 4888 bytes) - Fourth its all part of my plan to eventually be able to use RCU with the glock hash. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/ops_fstype.c')
-rw-r--r--fs/gfs2/ops_fstype.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
index c94422b30ce..f5140bdc102 100644
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -45,23 +45,16 @@ extern struct dentry_operations gfs2_dops;
static struct gfs2_sbd *init_sbd(struct super_block *sb)
{
struct gfs2_sbd *sdp;
- unsigned int x;
- sdp = vmalloc(sizeof(struct gfs2_sbd));
+ sdp = kzalloc(sizeof(struct gfs2_sbd), GFP_KERNEL);
if (!sdp)
return NULL;
- memset(sdp, 0, sizeof(struct gfs2_sbd));
-
sb->s_fs_info = sdp;
sdp->sd_vfs = sb;
gfs2_tune_init(&sdp->sd_tune);
- for (x = 0; x < GFS2_GL_HASH_SIZE; x++) {
- rwlock_init(&sdp->sd_gl_hash[x].hb_lock);
- INIT_LIST_HEAD(&sdp->sd_gl_hash[x].hb_list);
- }
INIT_LIST_HEAD(&sdp->sd_reclaim_list);
spin_lock_init(&sdp->sd_reclaim_lock);
init_waitqueue_head(&sdp->sd_reclaim_wq);