summaryrefslogtreecommitdiff
path: root/src/core/manager.h
diff options
context:
space:
mode:
authorChris Leech <cleech@redhat.com>2014-11-23 20:33:39 -0800
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-11-28 14:30:50 -0500
commitbefb6d54948480f836d53d633bef27e3505818c1 (patch)
treeaf77c29722d934c06ac261d2e74472058bc08d0c /src/core/manager.h
parent8d3ae2bd4c9bf9fc2e57f7b3776325a1c750ca30 (diff)
mount: monitor for utab changes with inotify
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.
Diffstat (limited to 'src/core/manager.h')
-rw-r--r--src/core/manager.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/manager.h b/src/core/manager.h
index 02535023a..ab75f902e 100644
--- a/src/core/manager.h
+++ b/src/core/manager.h
@@ -182,6 +182,8 @@ struct Manager {
/* Data specific to the mount subsystem */
FILE *proc_self_mountinfo;
sd_event_source *mount_event_source;
+ int utab_inotify_fd;
+ sd_event_source *mount_utab_event_source;
/* Data specific to the swap filesystem */
FILE *proc_swaps;