]> git.baikalelectronics.ru Git - kernel.git/commit
md/raid5: preferentially read from replacement device if possible.
authorNeilBrown <neilb@suse.de>
Thu, 22 Dec 2011 23:17:52 +0000 (10:17 +1100)
committerNeilBrown <neilb@suse.de>
Thu, 22 Dec 2011 23:17:52 +0000 (10:17 +1100)
commit7802ce65fd818b1ebb87c5b8ebc8fdd3767e005c
tree6009e1ccc1b766d4c55434e3b4c1d171b8a2c004
parent3884c7f6b04e95b01879c3b72d3979bb9f128884
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