aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/stackglue.h
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2008-02-20 17:29:27 -0500
committerMark Fasheh <mfasheh@suse.com>2008-04-18 11:56:07 -0400
commitcf4d8d75d8aba537a19b313a9364fd08ddbd5622 (patch)
tree8d07679a7a28375784b0ae9461ccea3d42aaafe5 /fs/ocfs2/stackglue.h
parentd4b95eef4dc4a59bcd42bdf783638a2eaa57b4c8 (diff)
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.h19
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 @@
26#include <linux/dlmconstants.h> 26#include <linux/dlmconstants.h>
27 27
28#include "dlm/dlmapi.h" 28#include "dlm/dlmapi.h"
29#include <linux/dlm.h>
29 30
30/* 31/*
31 * dlmconstants.h does not have a LOCAL flag. We hope to remove it 32 * dlmconstants.h does not have a LOCAL flag. We hope to remove it
@@ -60,6 +61,17 @@ struct ocfs2_locking_protocol {
60 void (*lp_unlock_ast)(void *astarg, int error); 61 void (*lp_unlock_ast)(void *astarg, int error);
61}; 62};
62 63
64
65/*
66 * The dlm_lockstatus struct includes lvb space, but the dlm_lksb struct only
67 * has a pointer to separately allocated lvb space. This struct exists only to
68 * include in the lksb union to make space for a combined dlm_lksb and lvb.
69 */
70struct fsdlm_lksb_plus_lvb {
71 struct dlm_lksb lksb;
72 char lvb[DLM_LVB_LEN];
73};
74
63/* 75/*
64 * A union of all lock status structures. We define it here so that the 76 * A union of all lock status structures. We define it here so that the
65 * size of the union is known. Lock status structures are embedded in 77 * size of the union is known. Lock status structures are embedded in
@@ -67,6 +79,8 @@ struct ocfs2_locking_protocol {
67 */ 79 */
68union ocfs2_dlm_lksb { 80union ocfs2_dlm_lksb {
69 struct dlm_lockstatus lksb_o2dlm; 81 struct dlm_lockstatus lksb_o2dlm;
82 struct dlm_lksb lksb_fsdlm;
83 struct fsdlm_lksb_plus_lvb padding;
70}; 84};
71 85
72/* 86/*
@@ -221,17 +235,18 @@ int ocfs2_cluster_disconnect(struct ocfs2_cluster_connection *conn,
221void ocfs2_cluster_hangup(const char *group, int grouplen); 235void ocfs2_cluster_hangup(const char *group, int grouplen);
222int ocfs2_cluster_this_node(unsigned int *node); 236int ocfs2_cluster_this_node(unsigned int *node);
223 237
238struct ocfs2_lock_res;
224int ocfs2_dlm_lock(struct ocfs2_cluster_connection *conn, 239int ocfs2_dlm_lock(struct ocfs2_cluster_connection *conn,
225 int mode, 240 int mode,
226 union ocfs2_dlm_lksb *lksb, 241 union ocfs2_dlm_lksb *lksb,
227 u32 flags, 242 u32 flags,
228 void *name, 243 void *name,
229 unsigned int namelen, 244 unsigned int namelen,
230 void *astarg); 245 struct ocfs2_lock_res *astarg);
231int ocfs2_dlm_unlock(struct ocfs2_cluster_connection *conn, 246int ocfs2_dlm_unlock(struct ocfs2_cluster_connection *conn,
232 union ocfs2_dlm_lksb *lksb, 247 union ocfs2_dlm_lksb *lksb,
233 u32 flags, 248 u32 flags,
234 void *astarg); 249 struct ocfs2_lock_res *astarg);
235 250
236int ocfs2_dlm_lock_status(union ocfs2_dlm_lksb *lksb); 251int ocfs2_dlm_lock_status(union ocfs2_dlm_lksb *lksb);
237void *ocfs2_dlm_lvb(union ocfs2_dlm_lksb *lksb); 252void *ocfs2_dlm_lvb(union ocfs2_dlm_lksb *lksb);