md/raid1: improve handling of read failure during recovery.
authorNeilBrown <neilb@suse.de>
Thu, 28 Jul 2011 01:33:42 +0000 (11:33 +1000)
committerNeilBrown <neilb@suse.de>
Thu, 28 Jul 2011 01:33:42 +0000 (11:33 +1000)
commit3a9f28a5117e00a868dd8b4395f9a707ae56764b
tree36fe0fc7a7ccfc0da03dea546286b7bdef581246
parentd8f05d2995d467a91db1af01637e6ffd94660ca8
md/raid1: improve handling of read failure during recovery.

If we cannot read a block from anywhere during recovery, there is
now a better approach than just giving up.
We can record a bad block on each device and keep going - being
careful not to clear the bad block when a write succeeds as it might -
it will be a write of incorrect data.

We have now reached the state where - for raid1 - we only call
md_error if md_set_badblocks has failed.

Signed-off-by: NeilBrown <neilb@suse.de>
Reviewed-by: Namhyung Kim <namhyung@gmail.com>
drivers/md/raid1.c