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.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 bf45d9bff8a..119f60cea9c 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) EXPORT_SYMBOL_GPL(ocfs2_stack_glue_set_locking_protocol); +/* + * The ocfs2_dlm_lock() and ocfs2_dlm_unlock() functions take + * "struct ocfs2_lock_res *astarg" instead of "void *astarg" because the + * underlying stack plugins need to pilfer the lksb off of the lock_res. + * If some other structure needs to be passed as an astarg, the plugins + * will need to be given a different avenue to the lksb. + */ 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) { BUG_ON(lproto == NULL); @@ -246,7 +253,7 @@ EXPORT_SYMBOL_GPL(ocfs2_dlm_lock); int ocfs2_dlm_unlock(struct ocfs2_cluster_connection *conn, union ocfs2_dlm_lksb *lksb, u32 flags, - void *astarg) + struct ocfs2_lock_res *astarg) { BUG_ON(lproto == NULL); @@ -360,7 +367,8 @@ void ocfs2_cluster_hangup(const char *group, int grouplen) BUG_ON(group == NULL); BUG_ON(group[grouplen] != '\0'); - active_stack->sp_ops->hangup(group, grouplen); + if (active_stack->sp_ops->hangup) + active_stack->sp_ops->hangup(group, grouplen); /* cluster_disconnect() was called with hangup_pending==1 */ ocfs2_stack_driver_put(); |