From a489aee130db4f6d04220f87e5c88ad4f5c3874e Mon Sep 17 00:00:00 2001 From: N Balachandran Date: Mon, 24 Jul 2017 17:48:47 +0530 Subject: cluster/dht: Correct iterator for decommissioned bricks Corrected the iterator for looping over the list of decommissioned bricks while checking if the new target determined because of min-free-disk values has been decommissioned. > BUG: 1474318 > Signed-off-by: N Balachandran > Reviewed-on: https://review.gluster.org/17861 > Reviewed-by: Susant Palai (cherry picked from commit 8c3e766fe0a473734e8eca0f70d0318a2b909e2e) Change-Id: Iee778547eb7370a8069e954b5d629fcedf54e59b BUG: 1475181 Signed-off-by: N Balachandran Reviewed-on: https://review.gluster.org/17872 Smoke: Gluster Build System CentOS-regression: Gluster Build System Reviewed-by: Shyamsundar Ranganathan --- xlators/cluster/dht/src/dht-rebalance.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c index 5f9644f3ab..ffc7fdff3f 100644 --- a/xlators/cluster/dht/src/dht-rebalance.c +++ b/xlators/cluster/dht/src/dht-rebalance.c @@ -1024,7 +1024,7 @@ find_new_subvol: * removed-brick, do not mark the error as failure */ if (conf->decommission_subvols_cnt) { *ignore_failure = _gf_true; - for (i = 0; i < conf->decommission_subvols_cnt; i++) { + for (i = 0; i < conf->subvolume_cnt; i++) { if (conf->decommissioned_bricks[i] == from) { *ignore_failure = _gf_false; break; -- cgit