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 <aspandey@redhat.com>
Reviewed-on: https://review.gluster.org/17007
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
This commit is contained in:
Ashish Pandey 2017-04-05 17:13:25 +05:30 committed by Pranith Kumar Karampuri
parent 1b01bdcc8e
commit e536bea09a

View File

@ -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,