summaryrefslogtreecommitdiffstats
path: root/src/core/manager.h
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2018-12-16 23:32:58 +0100
committerLennart Poettering <lennart@poettering.net>2018-12-19 00:44:19 +0100
commitfcfb1f775ed0e9d282607bb118ba788b98952855 (patch)
tree993fdf1e7b75ef615d8f5f1d3f6c2e6d4086e53a /src/core/manager.h
parentMerge pull request #11201 from keszybz/more-news (diff)
downloadsystemd-fcfb1f775ed0e9d282607bb118ba788b98952855.tar.xz
systemd-fcfb1f775ed0e9d282607bb118ba788b98952855.zip
mount: disable mount-storm protection while mount unit is starting.
The starting of mount units requires that changes to /proc/self/mountinfo be processed before the SIGCHILD from the completion of /sbin/mount is processed, as described by the comment /* Note that due to the io event priority logic, we can be sure the new mountinfo is loaded * before we process the SIGCHLD for the mount command. */ The recently-added mount-storm protection can defeat this as it will sometimes deliberately delay processing of /proc/self/mountinfo. So we need to disable mount-storm protection when a mount unit is starting. We do this by keeping a counter of the number of pending mounts, and disabling the protection when this is non-zero. Thanks to @asavah for finding and reporting this problem.
Diffstat (limited to 'src/core/manager.h')
-rw-r--r--src/core/manager.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/manager.h b/src/core/manager.h
index 9f8fc46434..18219a184b 100644
--- a/src/core/manager.h
+++ b/src/core/manager.h
@@ -230,6 +230,7 @@ struct Manager {
sd_event_source *mount_timeout_source;
usec_t mount_last_read_usec;
usec_t mount_last_duration_usec;
+ unsigned mount_pending_count;
/* Data specific to the swap filesystem */
FILE *proc_swaps;