summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src
diff options
context:
space:
mode:
authorshishir gowda <shishirng@gluster.com>2012-02-24 15:25:06 +0530
committerVijay Bellur <vijay@gluster.com>2012-02-27 02:19:31 -0800
commit19dd4b7f0080a1924099ace7e3d7fcd9f0314f2d (patch)
treeb96aa2ec3301b83d13c13ef4a92354b164a2535c /xlators/mgmt/glusterd/src
parenta3f6b0c4f231ccdb727227c9c35816b4823cef90 (diff)
mgmt/glusterd: pass defrag_cmd in rsp dict for volume info
glusterd_import_volinfo used to error out as it was not able to find the rebalance key in the dict Change-Id: Ife35a041072a8a978d7595e8381f68e624bd8da3 BUG: 797105 Signed-off-by: shishir gowda <shishirng@gluster.com> Reviewed-on: http://review.gluster.com/2814 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index e925c75a2..58a894532 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -1628,6 +1628,11 @@ glusterd_add_volume_to_dict (glusterd_volinfo_t *volinfo,
if (ret)
goto out;
+ memset (key, 0, sizeof (key));
+ snprintf (key, 256, "volume%d.rebalance", count);
+ ret = dict_set_int32 (dict, key, volinfo->defrag_cmd);
+ if (ret)
+ goto out;
if (volinfo->rb_status > GF_RB_STATUS_NONE) {
memset (key, 0, sizeof (key));