eventscripts: Reconfigure lock should be released quickly
authorMartin Schwenke <martin@meltin.net>
Wed, 18 Dec 2013 02:51:22 +0000 (13:51 +1100)
committerAmitay Isaacs <amitay@gmail.com>
Mon, 20 Jan 2014 01:31:10 +0000 (12:31 +1100)
commitf450c23be123a630e0525ecb16bb94e82f0d2cfc
treefaf987fefe952b8bcf0311b6de05f4acd499d690
parent112bb7a5a756c3b9aa5d853998520eca00e3c8e5
eventscripts: Reconfigure lock should be released quickly

Currently the lock is held until the corresponding eventscript
completes, since the process still exists.  If the regular part of an
eventscript hangs then the lock might unnecessarily be held for a long
time.  The pathological case is when a monitor event gets stuck in
D-wait state and the script times out but can't be killed so the lock
is still held.  This can cause an unwanted monitor replay.

Change this so that the lock is released immediately after the
reconfiguration is complete.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(Imported from commit 8eb20c23476d390bb8a12ba01c9f06e7ac4a1453)
config/functions
tests/eventscripts/60.nfs.multi.003.sh
tests/eventscripts/60.nfs.multi.004.sh
tests/eventscripts/60.nfs.multi.005.sh