]> git.ipfire.org Git - thirdparty/mdadm.git/commit
monitor: don't unblock a device that isn't blocked.
authorNeilBrown <neilb@suse.de>
Tue, 6 Dec 2011 21:39:39 +0000 (08:39 +1100)
committerNeilBrown <neilb@suse.de>
Tue, 6 Dec 2011 21:39:39 +0000 (08:39 +1100)
commit1c278e81813fc481114413f730ad348319382ffe
treed9617b5fdcd2facf2a848dfd65be6be05eaa6a0d
parentd1e02575f579abcb50c967c5126f07a60d4642bc
monitor: don't unblock a device that isn't blocked.

When we see a failed device, we both unblock and remove it (after
updating the metadata).
However it might not be blocked as there can be a delay between
unblocking and the device being free to be removed.

If this happens the clearing of 'blocked' succeeds so md sends a sysfs
notification and mdmon checks again and tries to clear 'blocked'
again.
Thus it enters a busy-loop until the 'remove' succeeds.

To avoid this, only try to unblock if the device was blocked.

Signed-off-by: NeilBrown <neilb@suse.de>
monitor.c