aboutsummaryrefslogtreecommitdiff
path: root/fs/ocfs2/dlm/dlmcommon.h
diff options
context:
space:
mode:
authorSunil Mushran <sunil.mushran@oracle.com>2009-02-26 15:00:41 -0800
committerMark Fasheh <mfasheh@suse.com>2009-04-03 11:39:19 -0700
commit2ed6c750d645d09b5948e46fada3ca1fda3157b5 (patch)
tree47d2a6b7d3f6407312f9857abdaf114f14223286 /fs/ocfs2/dlm/dlmcommon.h
parente2b66ddcce922529e058cf74d839c4c49c8379a1 (diff)
ocfs2/dlm: Activate dlm->master_hash for master list entries
With this patch, the mles are stored in a hash and not a simple list. This should improve the mle lookup time when the number of outstanding masteries is large. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/dlm/dlmcommon.h')
-rw-r--r--fs/ocfs2/dlm/dlmcommon.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ocfs2/dlm/dlmcommon.h b/fs/ocfs2/dlm/dlmcommon.h
index 425653f88e9..aa55271a7ac 100644
--- a/fs/ocfs2/dlm/dlmcommon.h
+++ b/fs/ocfs2/dlm/dlmcommon.h
@@ -56,12 +56,13 @@ enum dlm_mle_type {
};
struct dlm_lock_name {
+ unsigned int hash;
unsigned int len;
unsigned char name[DLM_LOCKID_NAME_MAX];
};
struct dlm_master_list_entry {
- struct list_head list;
+ struct hlist_node master_hash_node;
struct list_head hb_events;
struct dlm_ctxt *dlm;
spinlock_t spinlock;
@@ -152,7 +153,6 @@ struct dlm_ctxt
struct dlm_recovery_ctxt reco;
spinlock_t master_lock;
struct hlist_head **master_hash;
- struct list_head master_list;
struct list_head mle_hb_events;
/* these give a really vague idea of the system load */