From: NeilBrown Date: Fri, 8 May 2015 08:19:40 +0000 (+1000) Subject: md/raid5: fix handling of degraded stripes in batches. X-Git-Tag: omap-for-v4.2/wakeirq-drivers~2^2~39^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb27051f9fd7643f05d8f0babce3337f0b9b3087;p=pandora-kernel.git 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 --- Reading git-diff-tree failed