[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>
This commit is contained in:
Steven Whitehouse
2006-09-07 14:40:21 -04:00
parent b8547856f9
commit 85d1da67f7
5 changed files with 47 additions and 36 deletions

View File

@ -30,7 +30,6 @@ struct gfs2_quota_data;
struct gfs2_trans;
struct gfs2_ail;
struct gfs2_jdesc;
struct gfs2_gl_hash_bucket;
struct gfs2_sbd;
typedef void (*gfs2_glop_bh_t) (struct gfs2_glock *gl, unsigned int ret);
@ -107,6 +106,11 @@ struct gfs2_bufdata {
struct list_head bd_ail_gl_list;
};
struct gfs2_gl_hash_bucket {
rwlock_t hb_lock;
struct list_head hb_list;
};
struct gfs2_glock_operations {
void (*go_xmote_th) (struct gfs2_glock * gl, unsigned int state,
int flags);
@ -442,11 +446,6 @@ struct gfs2_tune {
unsigned int gt_statfs_slow;
};
struct gfs2_gl_hash_bucket {
rwlock_t hb_lock;
struct list_head hb_list;
};
enum {
SDF_JOURNAL_CHECKED = 0,
SDF_JOURNAL_LIVE = 1,
@ -489,7 +488,6 @@ struct gfs2_sbd {
/* Lock Stuff */
struct lm_lockstruct sd_lockstruct;
struct gfs2_gl_hash_bucket sd_gl_hash[GFS2_GL_HASH_SIZE];
struct list_head sd_reclaim_list;
spinlock_t sd_reclaim_lock;
wait_queue_head_t sd_reclaim_wq;