]> git.baikalelectronics.ru Git - kernel.git/commit
md: make sure MD_RECOVERY_DONE is clear before starting recovery/resync
authorNeilBrown <neilb@suse.de>
Fri, 12 Jun 2015 10:05:04 +0000 (20:05 +1000)
committerNeilBrown <neilb@suse.de>
Fri, 12 Jun 2015 10:16:33 +0000 (20:16 +1000)
commitc616338e6051cdf6325638f018da1f3fc34976b6
tree10c556b9ae108c35af563df9041e3d1948295e66
parent4cff09b24db293e21f2d09a25dcf7fa70bc59f73
md: make sure MD_RECOVERY_DONE is clear before starting recovery/resync

MD_RECOVERY_DONE is normally cleared by md_check_recovery after a
resync etc finished.  However it is possible for raid5_start_reshape
to race and start a reshape before MD_RECOVERY_DONE is cleared.  This
can lean to multiple reshapes running at the same time, which isn't
good.

To make sure it is cleared before starting a reshape, and also clear
it when reaping a thread, just to be safe.

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