Commit 45c5b2b9 authored by NeilBrown's avatar NeilBrown Committed by Greg Kroah-Hartman
Browse files

md/raid1: perform bad-block tests for WriteMostly devices too.



commit 307729c8 upstream.

We normally try to avoid reading from write-mostly devices, but when
we do we really have to check for bad blocks and be sure not to
try reading them.

With the current code, best_good_sectors might not get set and that
causes zero-length read requests to be send down which is very
confusing.

This bug was introduced in commit d2eb35ac and so the patch
is suitable for 3.1.x and 3.2.x

Reported-and-tested-by: default avatarMichał Mirosław <mirq-linux@rere.qmqm.pl>
Reported-and-tested-by: default avatarArt -kwaak- van Breemen <ard@telegraafnet.nl>
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent ee1f334f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment