]> git.baikalelectronics.ru Git - kernel.git/commit
md: don't retry recovery of raid1 that fails due to error on source drive.
authorNeilBrown <neilb@suse.de>
Thu, 8 Jan 2009 21:31:11 +0000 (08:31 +1100)
committerNeilBrown <neilb@suse.de>
Thu, 8 Jan 2009 21:31:11 +0000 (08:31 +1100)
commit94ec96d417ea956dd56dabf6fbc005569f9a2194
treee1bea8143538fc3eaeeb8578c2f9231e32809a25
parent1f4a505645666d52a0978f0eda668535f3ee9506
md: don't retry recovery of raid1 that fails due to error on source drive.

If a raid1 has only one working drive and it has a sector which
gives an error on read, then an attempt to recover onto a spare will
fail, but as the single remaining drive is not removed from the
array, the recovery will be immediately re-attempted, resulting
in an infinite recovery loop.

So detect this situation and don't retry recovery once an error
on the lone remaining drive is detected.

Allow recovery to be retried once every time a spare is added
in case the problem wasn't actually a media error.

Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/md.c
drivers/md/raid1.c
include/linux/raid/md_k.h