diff options
author | David Teigland <teigland@redhat.com> | 2008-02-20 17:29:27 -0500 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2008-04-18 11:56:07 -0400 |
commit | cf4d8d75d8aba537a19b313a9364fd08ddbd5622 (patch) | |
tree | 8d07679a7a28375784b0ae9461ccea3d42aaafe5 /fs/ocfs2/stackglue.c | |
parent | d4b95eef4dc4a59bcd42bdf783638a2eaa57b4c8 (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.c')
-rw-r--r-- | fs/ocfs2/stackglue.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/fs/ocfs2/stackglue.c b/fs/ocfs2/stackglue.c index bf45d9bff8a7..119f60cea9cc 100644 --- a/fs/ocfs2/stackglue.c +++ b/fs/ocfs2/stackglue.c | |||
@@ -228,13 +228,20 @@ void ocfs2_stack_glue_set_locking_protocol(struct ocfs2_locking_protocol *proto) | |||
228 | EXPORT_SYMBOL_GPL(ocfs2_stack_glue_set_locking_protocol); | 228 | EXPORT_SYMBOL_GPL(ocfs2_stack_glue_set_locking_protocol); |
229 | 229 | ||
230 | 230 | ||
231 | /* | ||
232 | * The ocfs2_dlm_lock() and ocfs2_dlm_unlock() functions take | ||
233 | * "struct ocfs2_lock_res *astarg" instead of "void *astarg" because the | ||
234 | * underlying stack plugins need to pilfer the lksb off of the lock_res. | ||
235 | * If some other structure needs to be passed as an astarg, the plugins | ||
236 | * will need to be given a different avenue to the lksb. | ||
237 | */ | ||
231 | int ocfs2_dlm_lock(struct ocfs2_cluster_connection *conn, | 238 | int ocfs2_dlm_lock(struct ocfs2_cluster_connection *conn, |
232 | int mode, | 239 | int mode, |
233 | union ocfs2_dlm_lksb *lksb, | 240 | union ocfs2_dlm_lksb *lksb, |
234 | u32 flags, | 241 | u32 flags, |
235 | void *name, | 242 | void *name, |
236 | unsigned int namelen, | 243 | unsigned int namelen, |
237 | void *astarg) | 244 | struct ocfs2_lock_res *astarg) |
238 | { | 245 | { |
239 | BUG_ON(lproto == NULL); | 246 | BUG_ON(lproto == NULL); |
240 | 247 | ||
@@ -246,7 +253,7 @@ EXPORT_SYMBOL_GPL(ocfs2_dlm_lock); | |||
246 | int ocfs2_dlm_unlock(struct ocfs2_cluster_connection *conn, | 253 | int ocfs2_dlm_unlock(struct ocfs2_cluster_connection *conn, |
247 | union ocfs2_dlm_lksb *lksb, | 254 | union ocfs2_dlm_lksb *lksb, |
248 | u32 flags, | 255 | u32 flags, |
249 | void *astarg) | 256 | struct ocfs2_lock_res *astarg) |
250 | { | 257 | { |
251 | BUG_ON(lproto == NULL); | 258 | BUG_ON(lproto == NULL); |
252 | 259 | ||
@@ -360,7 +367,8 @@ void ocfs2_cluster_hangup(const char *group, int grouplen) | |||
360 | BUG_ON(group == NULL); | 367 | BUG_ON(group == NULL); |
361 | BUG_ON(group[grouplen] != '\0'); | 368 | BUG_ON(group[grouplen] != '\0'); |
362 | 369 | ||
363 | active_stack->sp_ops->hangup(group, grouplen); | 370 | if (active_stack->sp_ops->hangup) |
371 | active_stack->sp_ops->hangup(group, grouplen); | ||
364 | 372 | ||
365 | /* cluster_disconnect() was called with hangup_pending==1 */ | 373 | /* cluster_disconnect() was called with hangup_pending==1 */ |
366 | ocfs2_stack_driver_put(); | 374 | ocfs2_stack_driver_put(); |