summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/dlm/dlmcommon.h
diff options
context:
space:
mode:
authorKurt Hackel2006-03-03 01:43:36 +0100
committerMark Fasheh2006-03-24 23:58:27 +0100
commit29004858a76ba9e26393dd8a85e653f105a33753 (patch)
treeaf526aed90f438d211e543ce7e8f2d8a1fa093e7 /fs/ocfs2/dlm/dlmcommon.h
parentocfs2: don't use MLF* in cluster/ files (diff)
downloadkernel-qcow2-linux-29004858a76ba9e26393dd8a85e653f105a33753.tar.gz
kernel-qcow2-linux-29004858a76ba9e26393dd8a85e653f105a33753.tar.xz
kernel-qcow2-linux-29004858a76ba9e26393dd8a85e653f105a33753.zip
ocfs2: don't use MLF* in dlm/ files
Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/dlm/dlmcommon.h')
-rw-r--r--fs/ocfs2/dlm/dlmcommon.h15
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)
return status;
}
+static inline u8 dlm_get_lock_cookie_node(u64 cookie)
+{
+ u8 ret;
+ cookie >>= 56;
+ ret = (u8)(cookie & 0xffULL);
+ return ret;
+}
+
+static inline unsigned long long dlm_get_lock_cookie_seq(u64 cookie)
+{
+ unsigned long long ret;
+ ret = ((unsigned long long)cookie) & 0x00ffffffffffffffULL;
+ return ret;
+}
+
struct dlm_lock * dlm_new_lock(int type, u8 node, u64 cookie,
struct dlm_lockstatus *lksb);
void dlm_lock_get(struct dlm_lock *lock);