md/raid10 record bad blocks as needed during recovery.
authorNeilBrown <neilb@suse.de>
Thu, 28 Jul 2011 01:39:24 +0000 (11:39 +1000)
committerNeilBrown <neilb@suse.de>
Thu, 28 Jul 2011 01:39:24 +0000 (11:39 +1000)
commite875ecea266a543e643b19e44cf472f1412708f9
treeb602d08f7aa4a743d3c27ad55e347d36991f0814
parent40c356ce5ad1a6be817825e1da1bc7494349cc6d
md/raid10 record bad blocks as needed during recovery.

When recovering one or more devices, if all the good devices have
bad blocks we should record a bad block on the device being rebuilt.

If this fails, we need to abort the recovery.

To ensure we don't think that we aborted later than we actually did,
we need to move the check for MD_RECOVERY_INTR earlier in md_do_sync,
in particular before mddev->curr_resync is updated.

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