diff options
author | Goldwyn Rodrigues <rgoldwyn@suse.de> | 2014-01-21 18:48:21 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-21 19:19:41 -0500 |
commit | c74a3bdd9b529d924d1abf986079b783dd105ace (patch) | |
tree | 5825198c12a9151ea403afae6b6822836b5f59b0 /fs/ocfs2/stackglue.h | |
parent | ff8fb335221e2c446b0d4cbea26be371fd2feb64 (diff) |
ocfs2: add clustername to cluster connection
This is an effort of removing ocfs2_controld.pcmk and getting ocfs2 DLM
handling up to the times with respect to DLM (>=4.0.1) and corosync
(2.3.x). AFAIK, cman also is being phased out for a unified corosync
cluster stack.
fs/dlm performs all the functions with respect to fencing and node
management and provides the API's to do so for ocfs2. For all future
references, DLM stands for fs/dlm code.
The advantages are:
+ No need to run an additional userspace daemon (ocfs2_controld)
+ No controld device handling and controld protocol
+ Shifting responsibilities of node management to DLM layer
For backward compatibility, we are keeping the controld handling code.
Once enough time has passed we can remove a significant portion of the
code. This was tested by using the kernel with changes on older
unmodified tools. The kernel used ocfs2_controld as expected, and
displayed the appropriate warning message.
This feature requires modification in the userspace ocfs2-tools. The
changes can be found at: https://github.com/goldwynr/ocfs2-tools branch:
nocontrold Currently, not many checks are present in the userspace code,
but that would change soon.
This patch (of 6):
Add clustername to cluster connection.
Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Reviewed-by: Mark Fasheh <mfasheh@suse.de>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ocfs2/stackglue.h')
-rw-r--r-- | fs/ocfs2/stackglue.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/ocfs2/stackglue.h b/fs/ocfs2/stackglue.h index 1ec56fdb8d0d..6d90f4192c14 100644 --- a/fs/ocfs2/stackglue.h +++ b/fs/ocfs2/stackglue.h | |||
@@ -45,6 +45,9 @@ struct file_lock; | |||
45 | */ | 45 | */ |
46 | #define GROUP_NAME_MAX 64 | 46 | #define GROUP_NAME_MAX 64 |
47 | 47 | ||
48 | /* This shadows OCFS2_CLUSTER_NAME_LEN */ | ||
49 | #define CLUSTER_NAME_MAX 16 | ||
50 | |||
48 | 51 | ||
49 | /* | 52 | /* |
50 | * ocfs2_protocol_version changes when ocfs2 does something different in | 53 | * ocfs2_protocol_version changes when ocfs2 does something different in |
@@ -97,8 +100,10 @@ struct ocfs2_locking_protocol { | |||
97 | * locking compatibility. | 100 | * locking compatibility. |
98 | */ | 101 | */ |
99 | struct ocfs2_cluster_connection { | 102 | struct ocfs2_cluster_connection { |
100 | char cc_name[GROUP_NAME_MAX]; | 103 | char cc_name[GROUP_NAME_MAX + 1]; |
101 | int cc_namelen; | 104 | int cc_namelen; |
105 | char cc_cluster_name[CLUSTER_NAME_MAX + 1]; | ||
106 | int cc_cluster_name_len; | ||
102 | struct ocfs2_protocol_version cc_version; | 107 | struct ocfs2_protocol_version cc_version; |
103 | struct ocfs2_locking_protocol *cc_proto; | 108 | struct ocfs2_locking_protocol *cc_proto; |
104 | void (*cc_recovery_handler)(int node_num, void *recovery_data); | 109 | void (*cc_recovery_handler)(int node_num, void *recovery_data); |
@@ -239,6 +244,8 @@ struct ocfs2_stack_plugin { | |||
239 | 244 | ||
240 | /* Used by the filesystem */ | 245 | /* Used by the filesystem */ |
241 | int ocfs2_cluster_connect(const char *stack_name, | 246 | int ocfs2_cluster_connect(const char *stack_name, |
247 | const char *cluster_name, | ||
248 | int cluster_name_len, | ||
242 | const char *group, | 249 | const char *group, |
243 | int grouplen, | 250 | int grouplen, |
244 | struct ocfs2_locking_protocol *lproto, | 251 | struct ocfs2_locking_protocol *lproto, |