diff options
Diffstat (limited to 'fs/ocfs2/dlm/dlmcommon.h')
-rw-r--r-- | fs/ocfs2/dlm/dlmcommon.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/fs/ocfs2/dlm/dlmcommon.h b/fs/ocfs2/dlm/dlmcommon.h index 3fecba0a6023..9c772583744a 100644 --- a/fs/ocfs2/dlm/dlmcommon.h +++ b/fs/ocfs2/dlm/dlmcommon.h | |||
@@ -37,9 +37,7 @@ | |||
37 | #define DLM_THREAD_SHUFFLE_INTERVAL 5 // flush everything every 5 passes | 37 | #define DLM_THREAD_SHUFFLE_INTERVAL 5 // flush everything every 5 passes |
38 | #define DLM_THREAD_MS 200 // flush at least every 200 ms | 38 | #define DLM_THREAD_MS 200 // flush at least every 200 ms |
39 | 39 | ||
40 | #define DLM_HASH_BITS 7 | 40 | #define DLM_HASH_BUCKETS (PAGE_SIZE / sizeof(struct hlist_head)) |
41 | #define DLM_HASH_SIZE (1 << DLM_HASH_BITS) | ||
42 | #define DLM_HASH_MASK (DLM_HASH_SIZE - 1) | ||
43 | 41 | ||
44 | enum dlm_ast_type { | 42 | enum dlm_ast_type { |
45 | DLM_AST = 0, | 43 | DLM_AST = 0, |
@@ -87,7 +85,7 @@ enum dlm_ctxt_state { | |||
87 | struct dlm_ctxt | 85 | struct dlm_ctxt |
88 | { | 86 | { |
89 | struct list_head list; | 87 | struct list_head list; |
90 | struct list_head *resources; | 88 | struct hlist_head *lockres_hash; |
91 | struct list_head dirty_list; | 89 | struct list_head dirty_list; |
92 | struct list_head purge_list; | 90 | struct list_head purge_list; |
93 | struct list_head pending_asts; | 91 | struct list_head pending_asts; |
@@ -208,13 +206,16 @@ static inline void __dlm_set_joining_node(struct dlm_ctxt *dlm, | |||
208 | #define DLM_LOCK_RES_IN_PROGRESS 0x00000010 | 206 | #define DLM_LOCK_RES_IN_PROGRESS 0x00000010 |
209 | #define DLM_LOCK_RES_MIGRATING 0x00000020 | 207 | #define DLM_LOCK_RES_MIGRATING 0x00000020 |
210 | 208 | ||
209 | /* max milliseconds to wait to sync up a network failure with a node death */ | ||
210 | #define DLM_NODE_DEATH_WAIT_MAX (5 * 1000) | ||
211 | |||
211 | #define DLM_PURGE_INTERVAL_MS (8 * 1000) | 212 | #define DLM_PURGE_INTERVAL_MS (8 * 1000) |
212 | 213 | ||
213 | struct dlm_lock_resource | 214 | struct dlm_lock_resource |
214 | { | 215 | { |
215 | /* WARNING: Please see the comment in dlm_init_lockres before | 216 | /* WARNING: Please see the comment in dlm_init_lockres before |
216 | * adding fields here. */ | 217 | * adding fields here. */ |
217 | struct list_head list; | 218 | struct hlist_node hash_node; |
218 | struct kref refs; | 219 | struct kref refs; |
219 | 220 | ||
220 | /* please keep these next 3 in this order | 221 | /* please keep these next 3 in this order |
@@ -657,6 +658,8 @@ void dlm_complete_thread(struct dlm_ctxt *dlm); | |||
657 | int dlm_launch_recovery_thread(struct dlm_ctxt *dlm); | 658 | int dlm_launch_recovery_thread(struct dlm_ctxt *dlm); |
658 | void dlm_complete_recovery_thread(struct dlm_ctxt *dlm); | 659 | void dlm_complete_recovery_thread(struct dlm_ctxt *dlm); |
659 | void dlm_wait_for_recovery(struct dlm_ctxt *dlm); | 660 | void dlm_wait_for_recovery(struct dlm_ctxt *dlm); |
661 | int dlm_is_node_dead(struct dlm_ctxt *dlm, u8 node); | ||
662 | int dlm_wait_for_node_death(struct dlm_ctxt *dlm, u8 node, int timeout); | ||
660 | 663 | ||
661 | void dlm_put(struct dlm_ctxt *dlm); | 664 | void dlm_put(struct dlm_ctxt *dlm); |
662 | struct dlm_ctxt *dlm_grab(struct dlm_ctxt *dlm); | 665 | struct dlm_ctxt *dlm_grab(struct dlm_ctxt *dlm); |