From 4f63b631dce4cb97525ee13fab0b2a789bcf6b15 Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Tue, 21 May 2013 16:29:32 +0530 Subject: cluster/dht: Ignore decommissioned subvol in overlap optimization Change-Id: Ib727948c6e21b19fd509f258ff0aea1c5d1a84d1 BUG: 966845 Signed-off-by: shishir gowda Reviewed-on: http://review.gluster.org/5056 Reviewed-by: Amar Tumballi Reviewed-by: Jeff Darcy Tested-by: Gluster Build System --- xlators/cluster/dht/src/dht-selfheal.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'xlators') diff --git a/xlators/cluster/dht/src/dht-selfheal.c b/xlators/cluster/dht/src/dht-selfheal.c index 037b26fed..b220a0e25 100644 --- a/xlators/cluster/dht/src/dht-selfheal.c +++ b/xlators/cluster/dht/src/dht-selfheal.c @@ -647,6 +647,13 @@ dht_selfheal_layout_maximize_overlap (call_frame_t *frame, loc_t *loc, max_overlap = 0; max_overlap_idx = i; for (j = (i + 1); j < new->cnt; ++j) { + if (new->list[j].err > 0) { + /* Subvol might be marked for decommission + with EINVAL, or some other serious error + marked with positive errno. + */ + continue; + } /* Calculate the overlap now. */ curr_overlap = OV_ENTRY(i,i) + OV_ENTRY(j,j); /* Calculate the overlap after the proposed swap. */ -- cgit