summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAtin Mukherjee <amukherj@redhat.com>2018-02-13 08:06:24 +0530
committerAtin Mukherjee <amukherj@redhat.com>2018-02-13 13:51:18 +0000
commit37a13e16532d2757ee489bb8195dfd6c567f2ca1 (patch)
tree64918d008f2457f46d5433262e08f8b474c9499b
parentadb266baa16f807745102ba925aa8a1028f8580a (diff)
glusterd: fix tier-enabled flag op-version check
tier-enabled flag in volinfo structure was introduced in 3.10, however while writing this value to the glusterd store was done with a wrong op-version check which results into volume checksum failure during upgrades. Change-Id: I4330d0c4594eee19cba42e2cdf49a63f106627d4 BUG: 1544600 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-store.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c
index f07e5fa315e..b6efac5a51a 100644
--- a/xlators/mgmt/glusterd/src/glusterd-store.c
+++ b/xlators/mgmt/glusterd/src/glusterd-store.c
@@ -1039,12 +1039,12 @@ glusterd_volume_exclude_options_write (int fd, glusterd_volinfo_t *volinfo)
buf);
if (ret)
goto out;
-
+ }
+ if (conf->op_version >= GD_OP_VERSION_3_10_0) {
snprintf (buf, sizeof (buf), "%d", volinfo->is_tier_enabled);
ret = gf_store_save_value (fd, GF_TIER_ENABLED, buf);
if (ret)
goto out;
-
}
ret = glusterd_volume_write_tier_details (fd, volinfo);