From b7f05e64f615a12e6487eab64544b8f92a6037ae Mon Sep 17 00:00:00 2001 From: vmallika Date: Fri, 22 May 2015 14:04:31 +0530 Subject: quota: quota.conf backward compatibility fix In release-3.7 the format of quota.conf is changed. There is a backward compatibility issues during upgrade 1) There can be an issue when peer sync between node-3.6 and node-3.7 2) If the user sets/removes limit, there is will different format of file in node-3.6 and node-3.7 This patch fixes the issue: 1) restrict the user to execute command quota enable, limit-usage, remove 2) write quota.conf in older format if op-version is less than 3.6 Change-Id: Ib76f5a0a85394642159607a105cacda743e7d26b BUG: 1223739 Signed-off-by: vmallika Reviewed-on: http://review.gluster.org/10889 Tested-by: NetBSD Build System Reviewed-by: Krishnan Parthasarathi --- xlators/mgmt/glusterd/src/glusterd-utils.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index 387e0a6e8ae..f90abc19b2e 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -2998,7 +2998,7 @@ glusterd_import_quota_conf (dict_t *peer_data, int vol_idx, if (ret) goto out; - ret = quota_conf_write_header (fd); + ret = glusterd_quota_conf_write_header (fd); if (ret) goto out; @@ -3018,7 +3018,8 @@ glusterd_import_quota_conf (dict_t *peer_data, int vol_idx, gfid_type = GF_QUOTA_CONF_TYPE_USAGE; gf_uuid_parse (gfid_str, gfid); - ret = quota_conf_write_gfid (fd, gfid, (char)gfid_type); + ret = glusterd_quota_conf_write_gfid (fd, gfid, + (char)gfid_type); if (ret < 0) { gf_log (this->name, GF_LOG_CRITICAL, "Unable to write " "gfid %s into quota.conf for %s", gfid_str, -- cgit