From e536bea09aa0776164716f9a0d480584c0a761f2 Mon Sep 17 00:00:00 2001 From: Ashish Pandey Date: Wed, 5 Apr 2017 17:13:25 +0530 Subject: cluster/ec : Don't count healing brick as healthy brick In ec_child_select, we should send fop on healing bricks unconditionaly but to check the number of healthy bricks against fragments and minimum count, we should not count these healing bricks. Count bits of fop->mask before adding ealing brick to fop->mask Change-Id: I3fa80bdd5ca34ca070d610116b84154b917c5999 BUG: 1439527 Signed-off-by: Ashish Pandey Reviewed-on: https://review.gluster.org/17007 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System Reviewed-by: Pranith Kumar Karampuri CentOS-regression: Gluster Build System --- xlators/cluster/ec/src/ec-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/cluster/ec') diff --git a/xlators/cluster/ec/src/ec-common.c b/xlators/cluster/ec/src/ec-common.c index a46cf6b1c55..2231a8da1f5 100644 --- a/xlators/cluster/ec/src/ec-common.c +++ b/xlators/cluster/ec/src/ec-common.c @@ -488,6 +488,7 @@ int32_t ec_child_select(ec_fop_data_t * fop) ec->idx = first; } + num = gf_bits_count(fop->mask); /*Unconditionally wind on healing subvolumes*/ fop->mask |= fop->healing; fop->remaining = fop->mask; @@ -495,7 +496,6 @@ int32_t ec_child_select(ec_fop_data_t * fop) ec_trace("SELECT", fop, ""); - num = gf_bits_count(fop->mask); if ((num < fop->minimum) && (num < ec->fragments)) { gf_msg (ec->xl->name, GF_LOG_ERROR, 0, -- cgit