]> git.baikalelectronics.ru Git - kernel.git/commit
md: Don't use remove_and_add_spares to remove failed devices from a read-only array
authorNeilBrown <neilb@suse.de>
Mon, 31 Jan 2011 02:47:13 +0000 (13:47 +1100)
committerNeilBrown <neilb@suse.de>
Mon, 31 Jan 2011 02:47:13 +0000 (13:47 +1100)
commit303d0a4ca1ea80bbf2172936442c759c1fb36e43
tree59b82042476e6b92ee293570d30a2580dba56d09
parent5ac7d1ecf44aa3f3282cf7ffda469489a99ed7a6
md: Don't use remove_and_add_spares to remove failed devices from a read-only array

remove_and_add_spares is called in two places where the needs really
are very different.
remove_and_add_spares should not be called on an array which is about
to be reshaped as some extra devices might have been manually added
and that would remove them.  However if the array is 'read-auto',
that will currently happen, which is bad.

So in the 'ro != 0' case don't call remove_and_add_spares but simply
remove the failed devices as the comment suggests is needed.

Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/md.c