diff options
Diffstat (limited to 'fs/ocfs2/stackglue.h')
-rw-r--r-- | fs/ocfs2/stackglue.h | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/fs/ocfs2/stackglue.h b/fs/ocfs2/stackglue.h index 3c91e241892b..3900b5c3933c 100644 --- a/fs/ocfs2/stackglue.h +++ b/fs/ocfs2/stackglue.h | |||
@@ -32,9 +32,22 @@ | |||
32 | */ | 32 | */ |
33 | #define DLM_LKF_LOCAL 0x00100000 | 33 | #define DLM_LKF_LOCAL 0x00100000 |
34 | 34 | ||
35 | /* | ||
36 | * This shadows DLM_LOCKSPACE_LEN in fs/dlm/dlm_internal.h. That probably | ||
37 | * wants to be in a public header. | ||
38 | */ | ||
39 | #define GROUP_NAME_MAX 64 | ||
40 | |||
41 | |||
35 | #include "dlm/dlmapi.h" | 42 | #include "dlm/dlmapi.h" |
36 | 43 | ||
44 | struct ocfs2_protocol_version { | ||
45 | u8 pv_major; | ||
46 | u8 pv_minor; | ||
47 | }; | ||
48 | |||
37 | struct ocfs2_locking_protocol { | 49 | struct ocfs2_locking_protocol { |
50 | struct ocfs2_protocol_version lp_max_version; | ||
38 | void (*lp_lock_ast)(void *astarg); | 51 | void (*lp_lock_ast)(void *astarg); |
39 | void (*lp_blocking_ast)(void *astarg, int level); | 52 | void (*lp_blocking_ast)(void *astarg, int level); |
40 | void (*lp_unlock_ast)(void *astarg, int error); | 53 | void (*lp_unlock_ast)(void *astarg, int error); |
@@ -44,14 +57,32 @@ union ocfs2_dlm_lksb { | |||
44 | struct dlm_lockstatus lksb_o2dlm; | 57 | struct dlm_lockstatus lksb_o2dlm; |
45 | }; | 58 | }; |
46 | 59 | ||
47 | int ocfs2_dlm_lock(struct dlm_ctxt *dlm, | 60 | struct ocfs2_cluster_connection { |
61 | char cc_name[GROUP_NAME_MAX]; | ||
62 | int cc_namelen; | ||
63 | struct ocfs2_protocol_version cc_version; | ||
64 | void (*cc_recovery_handler)(int node_num, void *recovery_data); | ||
65 | void *cc_recovery_data; | ||
66 | void *cc_lockspace; | ||
67 | void *cc_private; | ||
68 | }; | ||
69 | |||
70 | int ocfs2_cluster_connect(const char *group, | ||
71 | int grouplen, | ||
72 | void (*recovery_handler)(int node_num, | ||
73 | void *recovery_data), | ||
74 | void *recovery_data, | ||
75 | struct ocfs2_cluster_connection **conn); | ||
76 | int ocfs2_cluster_disconnect(struct ocfs2_cluster_connection *conn); | ||
77 | |||
78 | int ocfs2_dlm_lock(struct ocfs2_cluster_connection *conn, | ||
48 | int mode, | 79 | int mode, |
49 | union ocfs2_dlm_lksb *lksb, | 80 | union ocfs2_dlm_lksb *lksb, |
50 | u32 flags, | 81 | u32 flags, |
51 | void *name, | 82 | void *name, |
52 | unsigned int namelen, | 83 | unsigned int namelen, |
53 | void *astarg); | 84 | void *astarg); |
54 | int ocfs2_dlm_unlock(struct dlm_ctxt *dlm, | 85 | int ocfs2_dlm_unlock(struct ocfs2_cluster_connection *conn, |
55 | union ocfs2_dlm_lksb *lksb, | 86 | union ocfs2_dlm_lksb *lksb, |
56 | u32 flags, | 87 | u32 flags, |
57 | void *astarg); | 88 | void *astarg); |