• NeilBrown's avatar
    md/raid5: fix handling of degraded stripes in batches. · bb27051f
    NeilBrown authored
    There is no need for special handling of stripe-batches when the array
    is degraded.
    
    There may be if there is a failure in the batch, but STRIPE_DEGRADED
    does not imply an error.
    
    So don't set STRIPE_BATCH_ERR in ops_run_io just because the array is
    degraded.
    This actually causes a bug: the STRIPE_DEGRADED flag gets cleared in
    check_break_stripe_batch_list() and so the bitmap bit gets cleared
    when it shouldn't.
    
    So in check_break_stripe_batch_list(), split the batch up completely -
    again STRIPE_DEGRADED isn't meaningful.
    
    Also don't set STRIPE_BATCH_ERR when there is a write error to a
    replacement device.  This simply removes the replacement device and
    requires no extra handling.
    Signed-off-by: default avatarNeilBrown <neilb@suse.de>
    bb27051f
raid5.c 218 KB