diff options
author | vmallika <vmallika@redhat.com> | 2015-12-03 14:55:36 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2015-12-08 23:21:15 -0800 |
commit | 156022b67f5da2ca27a607ee9e7608fdf5e91a20 (patch) | |
tree | c667230e0726f64884c3eae511c367e13b8c5a7c /xlators/mgmt/glusterd/src/glusterd-utils.c | |
parent | 28da53e26e88f23f8917810ce0177f2628aa7e9a (diff) |
glusterd/quota: quota-version conflict in export/import volinfo
When exporting/importing voinfo during handshake,
quota conf and quota xattr version were using same key
'quota-version' and updated wrong values when importing
quota version values.
Change-Id: If939d6f5bc4851d4114963877be72dda21834f0f
BUG: 1287996
Signed-off-by: vmallika <vmallika@redhat.com>
Reviewed-on: http://review.gluster.org/12865
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index 848d0cce462..9cf0bf982bd 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -2574,8 +2574,8 @@ glusterd_add_volume_to_dict (glusterd_volinfo_t *volinfo, ret = dict_set_int32 (dict, key, volinfo->caps); memset (key, 0, sizeof (key)); - snprintf (key, sizeof (key), "%s%d.quota-version", prefix, count); - ret = dict_set_int32 (dict, key, volinfo->quota_version); + snprintf (key, sizeof (key), "%s%d.quota-xattr-version", prefix, count); + ret = dict_set_int32 (dict, key, volinfo->quota_xattr_version); out: GF_FREE (volume_id_str); GF_FREE (rebalance_id_str); @@ -3667,9 +3667,10 @@ glusterd_import_volinfo (dict_t *peer_data, int count, ret = dict_get_int32 (peer_data, key, &new_volinfo->caps); memset (key, 0, sizeof (key)); - snprintf (key, sizeof (key), "%s%d.quota_version", prefix, count); + snprintf (key, sizeof (key), "%s%d.quota-xattr-version", prefix, count); /*This is not present in older glusterfs versions, so ignore ret value*/ - ret = dict_get_int32 (peer_data, key, &new_volinfo->quota_version); + ret = dict_get_int32 (peer_data, key, + &new_volinfo->quota_xattr_version); ret = glusterd_import_bricks (peer_data, count, new_volinfo, prefix); if (ret) |