md/raid10: Handle read errors during recovery better.
authorNeilBrown <neilb@suse.de>
Thu, 28 Jul 2011 01:39:25 +0000 (11:39 +1000)
committerNeilBrown <neilb@suse.de>
Thu, 28 Jul 2011 01:39:25 +0000 (11:39 +1000)
commit5e5702898e93eee7d69b6efde109609a89a61001
tree87f47cc7e66da78befd16af6d479761b70f7adea
parente684e41db3bad44f1262341300b827c0d94ae220
md/raid10: Handle read errors during recovery better.

Currently when we get a read error during recovery, we simply abort
the recovery.

Instead, repeat the read in page-sized blocks.
On successful reads, write to the target.
On read errors, record a bad block on the destination,
and only if that fails do we abort the recovery.

As we now retry reads we need to know where we read from.  This was in
bi_sector but that can be changed during a read attempt.
So store the correct from_addr and to_addr in the r10_bio for later
access.

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