]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit383a736d90b94a4e098251c9d01d9586a2297a65
tree87f47cc7e66da78befd16af6d479761b70f7adea
parent3f2feb60c7a99e7061da3614b154a98f096fc062
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