Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185460
b: refs/heads/master
c: cbe0e33
h: refs/heads/master
v: v3
  • Loading branch information
Joel Becker committed Feb 26, 2010
1 parent fbf547d commit 156d712
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0016eedc4185a3cd7e578b027a6e69001b85d6c4
refs/heads/master: cbe0e331fdbdb256943499358c75bc098a2134c1
2 changes: 1 addition & 1 deletion trunk/fs/ocfs2/dlmfs/dlmfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ struct workqueue_struct *user_dlm_worker;
* - bast : POLLIN against the file descriptor of a held lock
* signifies a bast fired on the lock.
*/
#define DLMFS_CAPABILITIES "bast"
#define DLMFS_CAPABILITIES "bast stackglue"
extern int param_set_dlmfs_capabilities(const char *val,
struct kernel_param *kp)
{
Expand Down
8 changes: 4 additions & 4 deletions trunk/fs/ocfs2/dlmfs/userdlm.c
Original file line number Diff line number Diff line change
Expand Up @@ -666,10 +666,10 @@ struct ocfs2_cluster_connection *user_dlm_register(struct qstr *name)
int rc;
struct ocfs2_cluster_connection *conn;

rc = ocfs2_cluster_connect("o2cb", name->name, name->len,
&user_dlm_lproto,
user_dlm_recovery_handler_noop,
NULL, &conn);
rc = ocfs2_cluster_connect_agnostic(name->name, name->len,
&user_dlm_lproto,
user_dlm_recovery_handler_noop,
NULL, &conn);
if (rc)
mlog_errno(rc);

Expand Down
2 changes: 2 additions & 0 deletions trunk/fs/ocfs2/ocfs2_lockingver.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
/*
* The protocol version for ocfs2 cluster locking. See dlmglue.c for
* more details.
*
* 1.0 - Initial locking version from ocfs2 1.4.
*/
#define OCFS2_LOCKING_PROTOCOL_MAJOR 1
#define OCFS2_LOCKING_PROTOCOL_MINOR 0
Expand Down
18 changes: 18 additions & 0 deletions trunk/fs/ocfs2/stackglue.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,24 @@ int ocfs2_cluster_connect(const char *stack_name,
}
EXPORT_SYMBOL_GPL(ocfs2_cluster_connect);

/* The caller will ensure all nodes have the same cluster stack */
int ocfs2_cluster_connect_agnostic(const char *group,
int grouplen,
struct ocfs2_locking_protocol *lproto,
void (*recovery_handler)(int node_num,
void *recovery_data),
void *recovery_data,
struct ocfs2_cluster_connection **conn)
{
char *stack_name = NULL;

if (cluster_stack_name[0])
stack_name = cluster_stack_name;
return ocfs2_cluster_connect(stack_name, group, grouplen, lproto,
recovery_handler, recovery_data, conn);
}
EXPORT_SYMBOL_GPL(ocfs2_cluster_connect_agnostic);

/* If hangup_pending is 0, the stack driver will be dropped */
int ocfs2_cluster_disconnect(struct ocfs2_cluster_connection *conn,
int hangup_pending)
Expand Down
11 changes: 11 additions & 0 deletions trunk/fs/ocfs2/stackglue.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,17 @@ int ocfs2_cluster_connect(const char *stack_name,
void *recovery_data),
void *recovery_data,
struct ocfs2_cluster_connection **conn);
/*
* Used by callers that don't store their stack name. They must ensure
* all nodes have the same stack.
*/
int ocfs2_cluster_connect_agnostic(const char *group,
int grouplen,
struct ocfs2_locking_protocol *lproto,
void (*recovery_handler)(int node_num,
void *recovery_data),
void *recovery_data,
struct ocfs2_cluster_connection **conn);
int ocfs2_cluster_disconnect(struct ocfs2_cluster_connection *conn,
int hangup_pending);
void ocfs2_cluster_hangup(const char *group, int grouplen);
Expand Down

0 comments on commit 156d712

Please sign in to comment.