diff options
Diffstat (limited to 'fs/ocfs2/dlm/dlmcommon.h')
-rw-r--r-- | fs/ocfs2/dlm/dlmcommon.h | 21 |
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 | ||
633 | static 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 | |||
641 | static 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 | |||
633 | struct dlm_lock * dlm_new_lock(int type, u8 node, u64 cookie, | 648 | struct dlm_lock * dlm_new_lock(int type, u8 node, u64 cookie, |
634 | struct dlm_lockstatus *lksb); | 649 | struct dlm_lockstatus *lksb); |
635 | void dlm_lock_get(struct dlm_lock *lock); | 650 | void dlm_lock_get(struct dlm_lock *lock); |
@@ -658,6 +673,7 @@ void dlm_complete_thread(struct dlm_ctxt *dlm); | |||
658 | int dlm_launch_recovery_thread(struct dlm_ctxt *dlm); | 673 | int dlm_launch_recovery_thread(struct dlm_ctxt *dlm); |
659 | void dlm_complete_recovery_thread(struct dlm_ctxt *dlm); | 674 | void dlm_complete_recovery_thread(struct dlm_ctxt *dlm); |
660 | void dlm_wait_for_recovery(struct dlm_ctxt *dlm); | 675 | void dlm_wait_for_recovery(struct dlm_ctxt *dlm); |
676 | void dlm_kick_recovery_thread(struct dlm_ctxt *dlm); | ||
661 | int dlm_is_node_dead(struct dlm_ctxt *dlm, u8 node); | 677 | 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); | 678 | int 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); | |||
762 | int dlm_reco_data_done_handler(struct o2net_msg *msg, u32 len, void *data); | 778 | int dlm_reco_data_done_handler(struct o2net_msg *msg, u32 len, void *data); |
763 | int dlm_begin_reco_handler(struct o2net_msg *msg, u32 len, void *data); | 779 | int dlm_begin_reco_handler(struct o2net_msg *msg, u32 len, void *data); |
764 | int dlm_finalize_reco_handler(struct o2net_msg *msg, u32 len, void *data); | 780 | int dlm_finalize_reco_handler(struct o2net_msg *msg, u32 len, void *data); |
781 | int dlm_do_master_requery(struct dlm_ctxt *dlm, struct dlm_lock_resource *res, | ||
782 | u8 nodenum, u8 *real_master); | ||
783 | int dlm_lockres_master_requery(struct dlm_ctxt *dlm, | ||
784 | struct dlm_lock_resource *res, u8 *real_master); | ||
785 | |||
765 | 786 | ||
766 | int dlm_dispatch_assert_master(struct dlm_ctxt *dlm, | 787 | int dlm_dispatch_assert_master(struct dlm_ctxt *dlm, |
767 | struct dlm_lock_resource *res, | 788 | struct dlm_lock_resource *res, |