]> git.karo-electronics.de Git - karo-tx-linux.git/commit
md/raid10: Allow replacement device to be replace old drive.
authorNeilBrown <neilb@suse.de>
Fri, 9 Dec 2011 03:27:07 +0000 (14:27 +1100)
committerNeilBrown <neilb@suse.de>
Fri, 9 Dec 2011 03:27:07 +0000 (14:27 +1100)
commit13e910bfaa4910bb221a14f8fdc84ebbcd96125b
tree57ee74209f62bce808421ad96c58d8aa1e885b92
parent3e6478e05c40e2a3185737607643eb5c4aa4f79e
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