]> git.ipfire.org Git - thirdparty/mdadm.git/commit
mdmon: wait for previous mdmon to exit during takeover
authorPawel Baldysiak <pawel.baldysiak@intel.com>
Fri, 22 Feb 2019 12:30:27 +0000 (13:30 +0100)
committerJes Sorensen <jsorensen@fb.com>
Thu, 28 Feb 2019 20:47:01 +0000 (15:47 -0500)
commitd2e11da4b7fd0453e942f43e4196dc63b3dbd708
treec6260c1fdf686588f60390f6789e7194fb50e846
parent69d084784de196acec8ab703cd1b379af211d624
mdmon: wait for previous mdmon to exit during takeover

Since the patch c76242c5("mdmon: get safe mode delay file descriptor
early"), safe_mode_dalay is set properly by initrd mdmon.  But in some
cases with filesystem traffic since the very start of the system, it
might take a while to transit to clean state.  Due to fact that new
mdmon does not wait for the old one to exit - it might happen that the
new one switches safe_mode_delay back to seconds, before old one exits.
As the result two mdmons are running concurrently on same array.

Wait for the old mdmon to exit by pinging it with SIGUSR1 signal, just
in case it is sleeping.

Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
mdmon.c