]> git.baikalelectronics.ru Git - kernel.git/commit
md/raid1: really fix recovery looping when single good device fails.
authorNeilBrown <neilb@suse.de>
Wed, 24 Nov 2010 05:39:46 +0000 (16:39 +1100)
committerNeilBrown <neilb@suse.de>
Wed, 24 Nov 2010 05:39:46 +0000 (16:39 +1100)
commitabf77c121b6ce8b343fb4404e9beb5c308b9e727
tree4e1b3fe1460cd0c71258cfb2f68bb28cf71eeca4
parent2a534faf0fc531c68d3bd008661f9ebfd2051d84
md/raid1: really fix recovery looping when single good device fails.

Commit 94ec96d417ea956dd56dabf6fbc005569f9a2194 supposedly fixed a
problem where if a raid1 with just one good device gets a read-error
during recovery, the recovery would abort and immediately restart in
an infinite loop.

However it depended on raid1_remove_disk removing the spare device
from the array.  But that does not happen in this case.  So add a test
so that in the 'recovery_disabled' case, the device will be removed.

This suitable for any kernel since 2.6.29 which is when
recovery_disabled was introduced.

Cc: stable@kernel.org
Reported-by: Sebastian Färber <faerber@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid1.c