From 105dfa9f562b177a6faf4a0958e6d1b5840cee94 Mon Sep 17 00:00:00 2001 From: vmallika Date: Wed, 9 Dec 2015 13:13:17 +0530 Subject: quota: fix backward compatibility of new quota volinfo option quota-version features is implemented for 3.7.6 please see below patch for more details: http://review.gluster.org/#/c/12386 As part of this feature, new volume info option 'quota-version' was introduced, this can cause check-sum problem when a one of the node in a cluster is upgraded to 3.7.6 (heterogeneous cluster) So do a OP_VERSION check when storing this option in volume info Change-Id: Ic5b03a1e3f1236b645a065b1fadee7950307e191 BUG: 1283178 Signed-off-by: vmallika Reviewed-on: http://review.gluster.org/12642 Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: Atin Mukherjee --- xlators/mgmt/glusterd/src/glusterd-quota.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'xlators/mgmt/glusterd/src/glusterd-quota.c') 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: -- cgit