diff options
| -rw-r--r-- | fs/ocfs2/dlmfs/dlmfs.c | 2 | ||||
| -rw-r--r-- | fs/ocfs2/dlmfs/userdlm.c | 8 | ||||
| -rw-r--r-- | fs/ocfs2/ocfs2_lockingver.h | 2 | ||||
| -rw-r--r-- | fs/ocfs2/stackglue.c | 18 | ||||
| -rw-r--r-- | fs/ocfs2/stackglue.h | 11 |
5 files changed, 36 insertions, 5 deletions
diff --git a/fs/ocfs2/dlmfs/dlmfs.c b/fs/ocfs2/dlmfs/dlmfs.c index 8697366b63ad..1b0de157a08c 100644 --- a/fs/ocfs2/dlmfs/dlmfs.c +++ b/fs/ocfs2/dlmfs/dlmfs.c | |||
| @@ -87,7 +87,7 @@ struct workqueue_struct *user_dlm_worker; | |||
| 87 | * - bast : POLLIN against the file descriptor of a held lock | 87 | * - bast : POLLIN against the file descriptor of a held lock |
| 88 | * signifies a bast fired on the lock. | 88 | * signifies a bast fired on the lock. |
| 89 | */ | 89 | */ |
| 90 | #define DLMFS_CAPABILITIES "bast" | 90 | #define DLMFS_CAPABILITIES "bast stackglue" |
| 91 | extern int param_set_dlmfs_capabilities(const char *val, | 91 | extern int param_set_dlmfs_capabilities(const char *val, |
| 92 | struct kernel_param *kp) | 92 | struct kernel_param *kp) |
| 93 | { | 93 | { |
diff --git a/fs/ocfs2/dlmfs/userdlm.c b/fs/ocfs2/dlmfs/userdlm.c index c1b6a56a268f..2858ee6003c7 100644 --- a/fs/ocfs2/dlmfs/userdlm.c +++ b/fs/ocfs2/dlmfs/userdlm.c | |||
| @@ -666,10 +666,10 @@ struct ocfs2_cluster_connection *user_dlm_register(struct qstr *name) | |||
| 666 | int rc; | 666 | int rc; |
| 667 | struct ocfs2_cluster_connection *conn; | 667 | struct ocfs2_cluster_connection *conn; |
| 668 | 668 | ||
| 669 | rc = ocfs2_cluster_connect("o2cb", name->name, name->len, | 669 | rc = ocfs2_cluster_connect_agnostic(name->name, name->len, |
| 670 | &user_dlm_lproto, | 670 | &user_dlm_lproto, |
| 671 | user_dlm_recovery_handler_noop, | 671 | user_dlm_recovery_handler_noop, |
| 672 | NULL, &conn); | 672 | NULL, &conn); |
| 673 | if (rc) | 673 | if (rc) |
| 674 | mlog_errno(rc); | 674 | mlog_errno(rc); |
| 675 | 675 | ||
diff --git a/fs/ocfs2/ocfs2_lockingver.h b/fs/ocfs2/ocfs2_lockingver.h index 82d5eeac0fff..2e45c8d2ea7e 100644 --- a/fs/ocfs2/ocfs2_lockingver.h +++ b/fs/ocfs2/ocfs2_lockingver.h | |||
| @@ -23,6 +23,8 @@ | |||
| 23 | /* | 23 | /* |
| 24 | * The protocol version for ocfs2 cluster locking. See dlmglue.c for | 24 | * The protocol version for ocfs2 cluster locking. See dlmglue.c for |
| 25 | * more details. | 25 | * more details. |
| 26 | * | ||
| 27 | * 1.0 - Initial locking version from ocfs2 1.4. | ||
| 26 | */ | 28 | */ |
| 27 | #define OCFS2_LOCKING_PROTOCOL_MAJOR 1 | 29 | #define OCFS2_LOCKING_PROTOCOL_MAJOR 1 |
| 28 | #define OCFS2_LOCKING_PROTOCOL_MINOR 0 | 30 | #define OCFS2_LOCKING_PROTOCOL_MINOR 0 |
diff --git a/fs/ocfs2/stackglue.c b/fs/ocfs2/stackglue.c index 31db2e87cfd4..39abf89697ed 100644 --- a/fs/ocfs2/stackglue.c +++ b/fs/ocfs2/stackglue.c | |||
| @@ -373,6 +373,24 @@ out: | |||
| 373 | } | 373 | } |
| 374 | EXPORT_SYMBOL_GPL(ocfs2_cluster_connect); | 374 | EXPORT_SYMBOL_GPL(ocfs2_cluster_connect); |
| 375 | 375 | ||
| 376 | /* The caller will ensure all nodes have the same cluster stack */ | ||
| 377 | int ocfs2_cluster_connect_agnostic(const char *group, | ||
| 378 | int grouplen, | ||
| 379 | struct ocfs2_locking_protocol *lproto, | ||
| 380 | void (*recovery_handler)(int node_num, | ||
| 381 | void *recovery_data), | ||
| 382 | void *recovery_data, | ||
| 383 | struct ocfs2_cluster_connection **conn) | ||
| 384 | { | ||
| 385 | char *stack_name = NULL; | ||
| 386 | |||
| 387 | if (cluster_stack_name[0]) | ||
| 388 | stack_name = cluster_stack_name; | ||
| 389 | return ocfs2_cluster_connect(stack_name, group, grouplen, lproto, | ||
| 390 | recovery_handler, recovery_data, conn); | ||
| 391 | } | ||
| 392 | EXPORT_SYMBOL_GPL(ocfs2_cluster_connect_agnostic); | ||
| 393 | |||
| 376 | /* If hangup_pending is 0, the stack driver will be dropped */ | 394 | /* If hangup_pending is 0, the stack driver will be dropped */ |
| 377 | int ocfs2_cluster_disconnect(struct ocfs2_cluster_connection *conn, | 395 | int ocfs2_cluster_disconnect(struct ocfs2_cluster_connection *conn, |
| 378 | int hangup_pending) | 396 | int hangup_pending) |
diff --git a/fs/ocfs2/stackglue.h b/fs/ocfs2/stackglue.h index b1981ba4c91f..8ce7398ae1d2 100644 --- a/fs/ocfs2/stackglue.h +++ b/fs/ocfs2/stackglue.h | |||
| @@ -246,6 +246,17 @@ int ocfs2_cluster_connect(const char *stack_name, | |||
| 246 | void *recovery_data), | 246 | void *recovery_data), |
| 247 | void *recovery_data, | 247 | void *recovery_data, |
| 248 | struct ocfs2_cluster_connection **conn); | 248 | struct ocfs2_cluster_connection **conn); |
| 249 | /* | ||
| 250 | * Used by callers that don't store their stack name. They must ensure | ||
| 251 | * all nodes have the same stack. | ||
| 252 | */ | ||
| 253 | int ocfs2_cluster_connect_agnostic(const char *group, | ||
| 254 | int grouplen, | ||
| 255 | struct ocfs2_locking_protocol *lproto, | ||
| 256 | void (*recovery_handler)(int node_num, | ||
| 257 | void *recovery_data), | ||
| 258 | void *recovery_data, | ||
| 259 | struct ocfs2_cluster_connection **conn); | ||
| 249 | int ocfs2_cluster_disconnect(struct ocfs2_cluster_connection *conn, | 260 | int ocfs2_cluster_disconnect(struct ocfs2_cluster_connection *conn, |
| 250 | int hangup_pending); | 261 | int hangup_pending); |
| 251 | void ocfs2_cluster_hangup(const char *group, int grouplen); | 262 | void ocfs2_cluster_hangup(const char *group, int grouplen); |
