aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/dlm/dlmcommon.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/dlm/dlmcommon.h')
-rw-r--r--fs/ocfs2/dlm/dlmcommon.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/fs/ocfs2/dlm/dlmcommon.h b/fs/ocfs2/dlm/dlmcommon.h
index 9c772583744a..88cc43df18f1 100644
--- a/fs/ocfs2/dlm/dlmcommon.h
+++ b/fs/ocfs2/dlm/dlmcommon.h
@@ -630,6 +630,21 @@ __dlm_lockres_state_to_status(struct dlm_lock_resource *res)
630 return status; 630 return status;
631} 631}
632 632
633static inline u8 dlm_get_lock_cookie_node(u64 cookie)
634{
635 u8 ret;
636 cookie >>= 56;
637 ret = (u8)(cookie & 0xffULL);
638 return ret;
639}
640
641static inline unsigned long long dlm_get_lock_cookie_seq(u64 cookie)
642{
643 unsigned long long ret;
644 ret = ((unsigned long long)cookie) & 0x00ffffffffffffffULL;
645 return ret;
646}
647
633struct dlm_lock * dlm_new_lock(int type, u8 node, u64 cookie, 648struct dlm_lock * dlm_new_lock(int type, u8 node, u64 cookie,
634 struct dlm_lockstatus *lksb); 649 struct dlm_lockstatus *lksb);
635void dlm_lock_get(struct dlm_lock *lock); 650void dlm_lock_get(struct dlm_lock *lock);
@@ -658,6 +673,7 @@ void dlm_complete_thread(struct dlm_ctxt *dlm);
658int dlm_launch_recovery_thread(struct dlm_ctxt *dlm); 673int dlm_launch_recovery_thread(struct dlm_ctxt *dlm);
659void dlm_complete_recovery_thread(struct dlm_ctxt *dlm); 674void dlm_complete_recovery_thread(struct dlm_ctxt *dlm);
660void dlm_wait_for_recovery(struct dlm_ctxt *dlm); 675void dlm_wait_for_recovery(struct dlm_ctxt *dlm);
676void dlm_kick_recovery_thread(struct dlm_ctxt *dlm);
661int dlm_is_node_dead(struct dlm_ctxt *dlm, u8 node); 677int dlm_is_node_dead(struct dlm_ctxt *dlm, u8 node);
662int dlm_wait_for_node_death(struct dlm_ctxt *dlm, u8 node, int timeout); 678int dlm_wait_for_node_death(struct dlm_ctxt *dlm, u8 node, int timeout);
663 679
@@ -762,6 +778,11 @@ int dlm_request_all_locks_handler(struct o2net_msg *msg, u32 len, void *data);
762int dlm_reco_data_done_handler(struct o2net_msg *msg, u32 len, void *data); 778int dlm_reco_data_done_handler(struct o2net_msg *msg, u32 len, void *data);
763int dlm_begin_reco_handler(struct o2net_msg *msg, u32 len, void *data); 779int dlm_begin_reco_handler(struct o2net_msg *msg, u32 len, void *data);
764int dlm_finalize_reco_handler(struct o2net_msg *msg, u32 len, void *data); 780int dlm_finalize_reco_handler(struct o2net_msg *msg, u32 len, void *data);
781int dlm_do_master_requery(struct dlm_ctxt *dlm, struct dlm_lock_resource *res,
782 u8 nodenum, u8 *real_master);
783int dlm_lockres_master_requery(struct dlm_ctxt *dlm,
784 struct dlm_lock_resource *res, u8 *real_master);
785
765 786
766int dlm_dispatch_assert_master(struct dlm_ctxt *dlm, 787int dlm_dispatch_assert_master(struct dlm_ctxt *dlm,
767 struct dlm_lock_resource *res, 788 struct dlm_lock_resource *res,