From 5858fb83e5c3c301023ed214ead9c0ff8cf15c1f Mon Sep 17 00:00:00 2001 From: Gaurav Kumar Garg Date: Fri, 30 Oct 2015 16:39:16 +0530 Subject: 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: 1276643 Signed-off-by: Gaurav Kumar Garg Reviewed-on: http://review.gluster.org/12473 Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: Anand Nekkunti Reviewed-by: Atin Mukherjee --- xlators/mgmt/glusterd/src/glusterd.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'xlators/mgmt/glusterd/src') diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h index 5beff25c286..124c6cf0f9f 100644 --- a/xlators/mgmt/glusterd/src/glusterd.h +++ b/xlators/mgmt/glusterd/src/glusterd.h @@ -78,6 +78,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, @@ -89,8 +92,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, @@ -113,6 +114,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; -- cgit