summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src
diff options
context:
space:
mode:
authorAtin Mukherjee <amukherj@redhat.com>2016-04-26 12:46:18 +0530
committerAtin Mukherjee <amukherj@redhat.com>2016-04-26 22:04:06 -0700
commit57f66ea86a2fbf61df34b3d6854f639f437cc12b (patch)
tree49f4002694df0bd9d3918ae2e5480604dbffb244 /xlators/mgmt/glusterd/src
parent2fff1c41bbe1a355fe398df08f2a27844b925b47 (diff)
glusterd: fix validation of lower op-version check in volume set
Commit 2d87a98 introduced a validation to fail lowering down the cluster.op-version. Commit 2eb8758 actually changed the variable value from cluster's op-version to volume's op-version which resulted the logic go for a toss. Change-Id: I70df32b75c3a3fe47dc840c4a655059e5b124bca BUG: 1330545 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/14069 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/14077
Diffstat (limited to 'xlators/mgmt/glusterd/src')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 20112727d9b..24ef25b0b0f 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -1145,7 +1145,7 @@ glusterd_op_stage_set_volume (dict_t *dict, char **op_errstr)
"%s", errstr);
goto out;
}
- if (local_key_op_version > local_new_op_version) {
+ if (local_key_op_version > priv->op_version) {
local_new_op_version = local_key_op_version;
} else {
ret = -1;
@@ -1154,7 +1154,7 @@ glusterd_op_stage_set_volume (dict_t *dict, char **op_errstr)
" not be equal or lower than current"
" cluster op-version (%d).",
local_key_op_version,
- local_new_op_version);
+ priv->op_version);
gf_msg (this->name, GF_LOG_ERROR, 0,
GD_MSG_VERSION_UNSUPPORTED,
"%s", errstr);