diff options
author | shishir gowda <sgowda@redhat.com> | 2013-05-21 16:29:32 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-05-24 18:06:26 -0700 |
commit | 4f63b631dce4cb97525ee13fab0b2a789bcf6b15 (patch) | |
tree | 236ad79ad12728fba49c54aac65022de2b309f95 | |
parent | 757d697e586dd73edcd7400d9c6afee19ed49b85 (diff) |
cluster/dht: Ignore decommissioned subvol in overlap optimization
Change-Id: Ib727948c6e21b19fd509f258ff0aea1c5d1a84d1
BUG: 966845
Signed-off-by: shishir gowda <sgowda@redhat.com>
Reviewed-on: http://review.gluster.org/5056
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
-rw-r--r-- | xlators/cluster/dht/src/dht-selfheal.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-selfheal.c b/xlators/cluster/dht/src/dht-selfheal.c index 037b26fedb4..b220a0e25ac 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. */ |