]> git.karo-electronics.de Git - karo-tx-linux.git/commit
md/raid5: preferentially read from replacement device if possible.
authorNeilBrown <neilb@suse.de>
Wed, 9 Nov 2011 00:32:07 +0000 (11:32 +1100)
committerNeilBrown <neilb@suse.de>
Wed, 9 Nov 2011 00:32:07 +0000 (11:32 +1100)
commitef496c07a4a7ffab271680a63982006ccaca9ea5
tree731f0aa2ff56e5dda6d7f9371c6730edc88b6d42
parent31bfd9414193e6e1ea5bdac0f7f168ffd3847658
md/raid5: preferentially read from replacement device if possible.

If a replacement device is present and has been recovered far enough,
then use it for reading into the stripe cache.

If we get an error we don't try to repair it, we just fail the device.
A replacement device that gives errors does not sound sensible.

This requires removing the setting of R5_ReadError when we get
a read error during a read that bypasses the cache.  It was probably
a bad idea anyway as we don't know that every block in the read
caused an error, and it could cause ReadError to be set for the
replacement device, which is bad.

Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid5.c