summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-rebalance.c
diff options
context:
space:
mode:
authorPavan Sondur <pavan@gluster.com>2010-10-08 07:06:57 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-10-08 06:05:10 -0700
commitcd5c9df4b67073089a5502d5e4c2e2e7d2141e4a (patch)
tree9a4717a1916d41b540d4b5fb57a6b6ee0a3e316f /xlators/mgmt/glusterd/src/glusterd-rebalance.c
parent09914c02f24b4cc74cb6aad9994ae590cf8b76bf (diff)
mgmt/glusterd: Fix replace brick to pass src-brick and dst-brick port nos properly.
Fix also contains patch from shishir ng for maintaining replace-brick states in glusterd. Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1235 (Bug for all pump/migrate commits) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1235
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-rebalance.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-rebalance.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-rebalance.c b/xlators/mgmt/glusterd/src/glusterd-rebalance.c
index f24ff85c9..934fc7030 100644
--- a/xlators/mgmt/glusterd/src/glusterd-rebalance.c
+++ b/xlators/mgmt/glusterd/src/glusterd-rebalance.c
@@ -408,6 +408,13 @@ glusterd_handle_defrag_volume (rpcsvc_request_t *req)
goto out;
}
+ if (glusterd_is_rb_started (volinfo) ||
+ glusterd_is_rb_paused (volinfo)) {
+ gf_log ("glusterd", GF_LOG_DEBUG,
+ "Replace brick is in progress on volume %s",
+ cli_req.volname);
+ goto out;
+ }
volinfo->defrag = GF_CALLOC (1, sizeof (glusterd_defrag_info_t),
gf_gld_mt_defrag_info);
if (!volinfo->defrag)