summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGaurav Kumar Garg <garg.gaurav52@gmail.com>2015-10-30 16:39:16 +0530
committerAtin Mukherjee <amukherj@redhat.com>2015-11-03 20:14:20 -0800
commit8c1b22e79dcbb61cd39a5700076005e520261d6a (patch)
treeb3c03f056cb24e17a5777e817fccb3ba3cbb181f
parent081e7938c8711aa7ce8a2955bb34767b697cf8b9 (diff)
glusterd: move new feature (tiering) enum op to the last of the array
Currently new feature tiering have GD_OP_DETACH_TIER and GD_OP_TIER_MIGRATE enum in the middle of the glusterd_op_ enum array. In multi nodes cluster when one of the node upgraded from lower version to higher version and upon executing command can end up in a mismatch in enum ops at the receiver ends causing command execution fail. Fix is to put every new feature glusterd operation enum code to last of the enum array. Change-Id: I640f811065e8c84add624237aa80fed43fde5967 BUG: 1276029 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/12486 Reviewed-by: Anand Nekkunti <anekkunt@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h
index 0f668c2016e..b020b6a18fb 100644
--- a/xlators/mgmt/glusterd/src/glusterd.h
+++ b/xlators/mgmt/glusterd/src/glusterd.h
@@ -82,6 +82,9 @@ typedef struct glusterd_volinfo_ glusterd_volinfo_t;
struct glusterd_snap_;
typedef struct glusterd_snap_ glusterd_snap_t;
+/* For every new feature please add respective enum of new feature
+ * at the end of latest enum (just before the GD_OP_MAX enum)
+ */
typedef enum glusterd_op_ {
GD_OP_NONE = 0,
GD_OP_CREATE_VOLUME,
@@ -93,8 +96,6 @@ typedef enum glusterd_op_ {
GD_OP_DEFRAG_VOLUME,
GD_OP_ADD_BRICK,
GD_OP_REMOVE_BRICK,
- GD_OP_DETACH_TIER,
- GD_OP_TIER_MIGRATE,
GD_OP_REPLACE_BRICK,
GD_OP_SET_VOLUME,
GD_OP_RESET_VOLUME,
@@ -117,6 +118,8 @@ typedef enum glusterd_op_ {
GD_OP_BARRIER,
GD_OP_GANESHA,
GD_OP_BITROT,
+ GD_OP_DETACH_TIER,
+ GD_OP_TIER_MIGRATE,
GD_OP_MAX,
} glusterd_op_t;