]> 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)
commite6dc3de4f4241da8810837923354f1fdacfe88c3
tree87f47cc7e66da78befd16af6d479761b70f7adea
parentc9395ecc1d3e9ead18c2b55390a771d74b28ecaf
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