md/raid5: fix handling of degraded stripes in batches.
authorNeilBrown <neilb@suse.de>
Fri, 8 May 2015 08:19:40 +0000 (18:19 +1000)
committerNeilBrown <neilb@suse.de>
Fri, 8 May 2015 08:47:57 +0000 (18:47 +1000)
commitbb27051f9fd7643f05d8f0babce3337f0b9b3087
tree2da43b1ad6068591bbab98f464a82c1e06c6621d
parent738a273806ee0568369c9bb19ef3b102f54beef4
md/raid5: fix handling of degraded stripes in batches.

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: NeilBrown <neilb@suse.de>
drivers/md/raid5.c