chiark / gitweb /
mount: monitor for utab changes with inotify
authorChris Leech <cleech@redhat.com>
Mon, 24 Nov 2014 04:33:39 +0000 (20:33 -0800)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 28 Nov 2014 19:30:50 +0000 (14:30 -0500)
Parsing the mount table with libmount races against the mount command,
which will handle the actual mounting before updating utab.  This means
the poll event on /proc/self/mountinfo can kick of a reparse in systemd
before the utab information is available.

This change adds in an additional event source using inotify to watch
for changes to utab.  It only watches for IN_MOVED_TO events, matching
libmount behavior of always overwriting this file using rename(2).

This does add a second pass through the mount table parsing when utab is
updated.


No differences found