summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-09-21 12:20:34 +0530
committerVijay Bellur <vijay@gluster.com>2011-09-21 04:24:14 -0700
commit82d1a445b92526629d699f947a2d2bd029c8db75 (patch)
tree61bb9371fda674a9d429badfa750d1c4e7d19ac3 /xlators/mgmt/glusterd
parent4c0efe75411112d6e386fe10a138ec2d9218b8b8 (diff)
glusterd rebalance: set the proper status as per command given
for both 'migrate-data start' or 'migrate-data start force' commands the defrag status should start with 'migrate-data-started' state. Change-Id: Ic645bc764c4d24ab438187fb139c4a1c3ade8949 BUG: 3593 Reviewed-on: http://review.gluster.com/477 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shishir Gowda <shishirng@gluster.com>
Diffstat (limited to 'xlators/mgmt/glusterd')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-rebalance.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-rebalance.c b/xlators/mgmt/glusterd/src/glusterd-rebalance.c
index c4d4b02bf..1f31fb6ba 100644
--- a/xlators/mgmt/glusterd/src/glusterd-rebalance.c
+++ b/xlators/mgmt/glusterd/src/glusterd-rebalance.c
@@ -570,6 +570,10 @@ glusterd_handle_defrag_start (glusterd_volinfo_t *volinfo, char *op_errstr,
runner_end (&runner);
volinfo->defrag_status = GF_DEFRAG_STATUS_LAYOUT_FIX_STARTED;
+ if ((cmd == GF_DEFRAG_CMD_START_MIGRATE_DATA) ||
+ (cmd == GF_DEFRAG_CMD_START_MIGRATE_DATA_FORCE)) {
+ volinfo->defrag_status = GF_DEFRAG_STATUS_MIGRATE_DATA_STARTED;
+ }
if (cbk)
defrag->cbk_fn = cbk;