]> git.baikalelectronics.ru Git - kernel.git/commit
md/raid10: Fix bug when activating a hot-spare.
authorNeilBrown <neilb@suse.de>
Mon, 31 Oct 2011 01:59:44 +0000 (12:59 +1100)
committerNeilBrown <neilb@suse.de>
Mon, 31 Oct 2011 01:59:44 +0000 (12:59 +1100)
commitf9756acc1298a212d20117e34849fbcf852b91cb
treece4b03fa3dfc07fb19b4d6c3653ba41ec1f926db
parent1c65746f11402742ef77ee340b6049a835b47834
md/raid10:  Fix bug when activating a hot-spare.

This is a fairly serious bug in RAID10.

When a RAID10 array is degraded and a hot-spare is activated, the
spare does not take up the empty slot, but rather replaces the first
working device.
This is likely to make the array non-functional.   It would normally
be possible to recover the data, but that would need care and is not
guaranteed.

This bug was introduced in commit
   d7b0cf334f5b7b6eba69d43d6cccf922ba61d366
which first appeared in 3.1.

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