]> git.karo-electronics.de Git - karo-tx-linux.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)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 21 Mar 2011 19:43:51 +0000 (12:43 -0700)
commit440692ac192c43876bf2f21f7f215dd037e2a823
tree9aa57817d9acdc2b57980603f3c00799c499f71f
parentffcac2098d79a1d68eaddcf05d5b6aecfde6a41c
md/raid1: really fix recovery looping when single good device fails.

commit 8f9e0ee38f75d4740daa9e42c8af628d33d19a02 upstream.

Commit 4044ba58dd15cb01797c4fd034f39ef4a75f7cc3 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.

Reported-by: Sebastian Färber <faerber@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/md/raid1.c