diff options
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 @@ | |||
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 | */ | ||
70 | struct 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 | */ |
68 | union ocfs2_dlm_lksb { | 80 | union 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, | |||
221 | void ocfs2_cluster_hangup(const char *group, int grouplen); | 235 | void ocfs2_cluster_hangup(const char *group, int grouplen); |
222 | int ocfs2_cluster_this_node(unsigned int *node); | 236 | int ocfs2_cluster_this_node(unsigned int *node); |
223 | 237 | ||
238 | struct ocfs2_lock_res; | ||
224 | int ocfs2_dlm_lock(struct ocfs2_cluster_connection *conn, | 239 | int 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); |
231 | int ocfs2_dlm_unlock(struct ocfs2_cluster_connection *conn, | 246 | int 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 | ||
236 | int ocfs2_dlm_lock_status(union ocfs2_dlm_lksb *lksb); | 251 | int ocfs2_dlm_lock_status(union ocfs2_dlm_lksb *lksb); |
237 | void *ocfs2_dlm_lvb(union ocfs2_dlm_lksb *lksb); | 252 | void *ocfs2_dlm_lvb(union ocfs2_dlm_lksb *lksb); |