]> Pileus Git - ~andy/linux/blobdiff - fs/ocfs2/stackglue.h
ocfs2: add clustername to cluster connection
[~andy/linux] / fs / ocfs2 / stackglue.h
index 1ec56fdb8d0d91752682bc532132dc6ae9cc029b..6d90f4192c146ae0b7c76eb0225d7f35abd8adbe 100644 (file)
@@ -45,6 +45,9 @@ struct file_lock;
  */
 #define GROUP_NAME_MAX         64
 
+/* This shadows  OCFS2_CLUSTER_NAME_LEN */
+#define CLUSTER_NAME_MAX       16
+
 
 /*
  * ocfs2_protocol_version changes when ocfs2 does something different in
@@ -97,8 +100,10 @@ struct ocfs2_locking_protocol {
  * locking compatibility.
  */
 struct ocfs2_cluster_connection {
-       char cc_name[GROUP_NAME_MAX];
+       char cc_name[GROUP_NAME_MAX + 1];
        int cc_namelen;
+       char cc_cluster_name[CLUSTER_NAME_MAX + 1];
+       int cc_cluster_name_len;
        struct ocfs2_protocol_version cc_version;
        struct ocfs2_locking_protocol *cc_proto;
        void (*cc_recovery_handler)(int node_num, void *recovery_data);
@@ -239,6 +244,8 @@ struct ocfs2_stack_plugin {
 
 /* Used by the filesystem */
 int ocfs2_cluster_connect(const char *stack_name,
+                         const char *cluster_name,
+                         int cluster_name_len,
                          const char *group,
                          int grouplen,
                          struct ocfs2_locking_protocol *lproto,