From 8abd500b79233c292a6098fe4e3672cacb2017d0 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 Reviewed-on: http://review.gluster.org/6517 Reviewed-by: Shishir Gowda Reviewed-by: Vijay Bellur --- xlators/cluster/dht/src/dht-selfheal.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xlators/cluster/dht/src/dht-selfheal.c b/xlators/cluster/dht/src/dht-selfheal.c index 39ee2b70be3..f82d7227ac3 100644 --- a/xlators/cluster/dht/src/dht-selfheal.c +++ b/xlators/cluster/dht/src/dht-selfheal.c @@ -669,6 +669,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