diff options
author | Sunil Mushran <sunil.mushran@oracle.com> | 2009-02-26 18:00:41 -0500 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2009-04-03 14:39:19 -0400 |
commit | 2ed6c750d645d09b5948e46fada3ca1fda3157b5 (patch) | |
tree | 47d2a6b7d3f6407312f9857abdaf114f14223286 /fs/ocfs2/dlm/dlmcommon.h | |
parent | e2b66ddcce922529e058cf74d839c4c49c8379a1 (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.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ocfs2/dlm/dlmcommon.h b/fs/ocfs2/dlm/dlmcommon.h index 425653f88e98..aa55271a7aca 100644 --- a/fs/ocfs2/dlm/dlmcommon.h +++ b/fs/ocfs2/dlm/dlmcommon.h | |||
@@ -56,12 +56,13 @@ enum dlm_mle_type { | |||
56 | }; | 56 | }; |
57 | 57 | ||
58 | struct dlm_lock_name { | 58 | struct dlm_lock_name { |
59 | unsigned int hash; | ||
59 | unsigned int len; | 60 | unsigned int len; |
60 | unsigned char name[DLM_LOCKID_NAME_MAX]; | 61 | unsigned char name[DLM_LOCKID_NAME_MAX]; |
61 | }; | 62 | }; |
62 | 63 | ||
63 | struct dlm_master_list_entry { | 64 | struct dlm_master_list_entry { |
64 | struct list_head list; | 65 | struct hlist_node master_hash_node; |
65 | struct list_head hb_events; | 66 | struct list_head hb_events; |
66 | struct dlm_ctxt *dlm; | 67 | struct dlm_ctxt *dlm; |
67 | spinlock_t spinlock; | 68 | spinlock_t spinlock; |
@@ -152,7 +153,6 @@ struct dlm_ctxt | |||
152 | struct dlm_recovery_ctxt reco; | 153 | struct dlm_recovery_ctxt reco; |
153 | spinlock_t master_lock; | 154 | spinlock_t master_lock; |
154 | struct hlist_head **master_hash; | 155 | struct hlist_head **master_hash; |
155 | struct list_head master_list; | ||
156 | struct list_head mle_hb_events; | 156 | struct list_head mle_hb_events; |
157 | 157 | ||
158 | /* these give a really vague idea of the system load */ | 158 | /* these give a really vague idea of the system load */ |