]> git.karo-electronics.de Git - karo-tx-linux.git/commit
md/raid10: Allow replacement device to be replace old drive.
authorNeilBrown <neilb@suse.de>
Wed, 9 Nov 2011 00:32:11 +0000 (11:32 +1100)
committerNeilBrown <neilb@suse.de>
Wed, 9 Nov 2011 00:32:11 +0000 (11:32 +1100)
commit2e21e2275b0561bb4ebf2ab06faebed6b4ee13d0
tree852bff0a13327d2126dab79b1e83c46a6a7d8bc6
parente1f6cbf7e1b02d96d9a8b27eaa519a4cfa8c10fd
md/raid10: Allow replacement device to be replace old drive.

When recovery finish and spare_active is called, check for a
replace that might have just become fully synced and mark it
as such, marking the original as failed.

Then when the original is removed, move the replacement into
its position.

This means that 'replacement' and spontaneously become NULL in some
situations.  Make sure we check for those.
It also means that 'rdev' and 'replacement' could appear to be
identical - check for that too.

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