diff options
author | David Teigland <teigland@redhat.com> | 2008-02-20 14:29:27 -0800 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2008-04-18 08:56:07 -0700 |
commit | cf4d8d75d8aba537a19b313a9364fd08ddbd5622 (patch) | |
tree | 8d07679a7a28375784b0ae9461ccea3d42aaafe5 /fs/ocfs2/stackglue.h | |
parent | d4b95eef4dc4a59bcd42bdf783638a2eaa57b4c8 (diff) | |
download | linux-cf4d8d75d8aba537a19b313a9364fd08ddbd5622.tar.gz linux-cf4d8d75d8aba537a19b313a9364fd08ddbd5622.tar.bz2 linux-cf4d8d75d8aba537a19b313a9364fd08ddbd5622.zip |
ocfs2: add fsdlm to stackglue
Add code to use fs/dlm.
[ Modified to be part of the stack_user module -- Joel ]
Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/stackglue.h')
-rw-r--r-- | fs/ocfs2/stackglue.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/fs/ocfs2/stackglue.h b/fs/ocfs2/stackglue.h index d88bc655644b..005e4f170e0f 100644 --- a/fs/ocfs2/stackglue.h +++ b/fs/ocfs2/stackglue.h @@ -26,6 +26,7 @@ #include <linux/dlmconstants.h> #include "dlm/dlmapi.h" +#include <linux/dlm.h> /* * dlmconstants.h does not have a LOCAL flag. We hope to remove it @@ -60,6 +61,17 @@ struct ocfs2_locking_protocol { void (*lp_unlock_ast)(void *astarg, int error); }; + +/* + * The dlm_lockstatus struct includes lvb space, but the dlm_lksb struct only + * has a pointer to separately allocated lvb space. This struct exists only to + * include in the lksb union to make space for a combined dlm_lksb and lvb. + */ +struct fsdlm_lksb_plus_lvb { + struct dlm_lksb lksb; + char lvb[DLM_LVB_LEN]; +}; + /* * A union of all lock status structures. We define it here so that the * size of the union is known. Lock status structures are embedded in @@ -67,6 +79,8 @@ struct ocfs2_locking_protocol { */ union ocfs2_dlm_lksb { struct dlm_lockstatus lksb_o2dlm; + struct dlm_lksb lksb_fsdlm; + struct fsdlm_lksb_plus_lvb padding; }; /* @@ -221,17 +235,18 @@ int ocfs2_cluster_disconnect(struct ocfs2_cluster_connection *conn, void ocfs2_cluster_hangup(const char *group, int grouplen); int ocfs2_cluster_this_node(unsigned int *node); +struct ocfs2_lock_res; int ocfs2_dlm_lock(struct ocfs2_cluster_connection *conn, int mode, union ocfs2_dlm_lksb *lksb, u32 flags, void *name, unsigned int namelen, - void *astarg); + struct ocfs2_lock_res *astarg); int ocfs2_dlm_unlock(struct ocfs2_cluster_connection *conn, union ocfs2_dlm_lksb *lksb, u32 flags, - void *astarg); + struct ocfs2_lock_res *astarg); int ocfs2_dlm_lock_status(union ocfs2_dlm_lksb *lksb); void *ocfs2_dlm_lvb(union ocfs2_dlm_lksb *lksb); |