summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-quota.c9
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-store.c14
2 files changed, 18 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-quota.c b/xlators/mgmt/glusterd/src/glusterd-quota.c
index e58370af068..73018ad44dc 100644
--- a/xlators/mgmt/glusterd/src/glusterd-quota.c
+++ b/xlators/mgmt/glusterd/src/glusterd-quota.c
@@ -92,6 +92,15 @@ glusterd_is_quota_supported (int32_t type, char **op_errstr)
type == GF_QUOTA_OPTION_TYPE_REMOVE))
goto out;
+ /* Quota xattr version implemented in 3.7.6
+ * quota-version is incremented when quota is enabled
+ * so don't allow enabling quota in heterogeneous
+ * cluster during upgrade
+ */
+ if (conf->op_version < GD_OP_VERSION_3_7_6 &&
+ type == GF_QUOTA_OPTION_TYPE_ENABLE)
+ goto out;
+
supported = _gf_true;
out:
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c
index c436e3b8195..5f04f7cdffd 100644
--- a/xlators/mgmt/glusterd/src/glusterd-store.c
+++ b/xlators/mgmt/glusterd/src/glusterd-store.c
@@ -1019,11 +1019,15 @@ glusterd_volume_exclude_options_write (int fd, glusterd_volinfo_t *volinfo)
goto out;
}
- snprintf (buf, sizeof (buf), "%d", volinfo->quota_xattr_version);
- ret = gf_store_save_value (fd, GLUSTERD_STORE_KEY_VOL_QUOTA_VERSION,
- buf);
- if (ret)
- goto out;
+ if (conf->op_version >= GD_OP_VERSION_3_7_6) {
+ snprintf (buf, sizeof (buf), "%d",
+ volinfo->quota_xattr_version);
+ ret = gf_store_save_value (fd,
+ GLUSTERD_STORE_KEY_VOL_QUOTA_VERSION,
+ buf);
+ if (ret)
+ goto out;
+ }
ret = glusterd_volume_write_tier_details (fd, volinfo);