]> git.ipfire.org Git - thirdparty/mdadm.git/commit - managemon.c
mdmon: don't monitor /proc/mounts to decide when to create .pid file.
authorNeilBrown <neilb@suse.de>
Mon, 8 Feb 2010 03:12:46 +0000 (14:12 +1100)
committerNeilBrown <neilb@suse.de>
Mon, 8 Feb 2010 06:26:18 +0000 (17:26 +1100)
commit58a4ba2a6b66ac14fa0ebaf0ce40326582d31429
tree888e17d468d13b4bd542da83c7bb8da5f79174b6
parentb5c727dc1a55323f02e5f60a50bcecb866dd51ea
mdmon: don't monitor /proc/mounts to decide when to create .pid file.

Monitoring /proc/mounts and creating a .pid file as soon as /var/run
is writable is racy.  Most distros clean all non-directories from
/var/run early in boot and if mdmon races with this it could
lose the files as soon as they are created.

Instead require that "mdmon --takeover" be run after /var is writable.

Signed-off-by: NeilBrown <neilb@suse.de>
managemon.c
mdadm.h
mdstat.c