From 3c38ba1e7b4959602f945112a26b8aee904fefaa Mon Sep 17 00:00:00 2001 From: Kaushal M Date: Thu, 14 Nov 2013 12:15:53 +0530 Subject: glusterd: Start rebalance only where required Gluster was starting rebalance processes on peers where it wasn't required in two cases. - For a normal rebalance command on a volume, rebalance processes were started on all peers instead of just the peers which contain bricks of the volume - For rebalance process being restarted by a volume sync, caused by a new peer being probed or a peer restarting, rebalance processes were started on all peers, for both a normal rebalance and for remove-brick needing rebalance. This patch adds a new check before starting rebalance process in the above two cases. - For rebalance process required by a rebalance command, each peer will check if it contains atleast one brick of the volume - For rebalance process required by a remove-brick command, each peer will check if it contains atleast one of the bricks being removed Change-Id: I512da16994f0d5482889c3a009c46dc20a8a15bb BUG: 1031887 Signed-off-by: Kaushal M Reviewed-on: http://review.gluster.org/6301 Tested-by: Gluster Build System Reviewed-by: Krutika Dhananjay Reviewed-by: Anand Avati --- xlators/mgmt/glusterd/src/glusterd-utils.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.h') diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.h b/xlators/mgmt/glusterd/src/glusterd-utils.h index 57120fe3942..5b0cfca7b55 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.h +++ b/xlators/mgmt/glusterd/src/glusterd-utils.h @@ -573,4 +573,7 @@ glusterd_check_gsync_running_local (char *master, char *slave, gf_boolean_t glusterd_is_status_tasks_op (glusterd_op_t op, dict_t *dict); + +gf_boolean_t +gd_should_i_start_rebalance (glusterd_volinfo_t *volinfo); #endif -- cgit