diff options
Diffstat (limited to 'fs/ocfs2/dlm/dlmcommon.h')
-rw-r--r-- | fs/ocfs2/dlm/dlmcommon.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/fs/ocfs2/dlm/dlmcommon.h b/fs/ocfs2/dlm/dlmcommon.h index a8aec9341347..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); |