<div dir="ltr">Downside of this patch is, mountinfo mounts stick around as inactive-dead even when the file system they represent is unmounted.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 4, 2013 at 3:00 PM, Umut Tezduyar <span dir="ltr"><<a href="mailto:umut@tezduyar.com" target="_blank">umut@tezduyar.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">.mount units coming from /proc/self/mountinfo file are<br>
unmounted after local-fs.target is reached during shutdown.<br>
<br>
Problem: .mount units popping up in mountinfo file are<br>
added to systemd without any dependency. For that reason,<br>
they are the first one to be unmounted during shutdown.<br>
Whichever program mounted the file system deserves a<br>
chance to also unmount it. This patch ensures that<br>
/proc/self/mountinfo units will be unmounted after<br>
local-fs.target during shutdown (if they haven't been<br>
unmounted already)<br>
---<br>
src/core/mount.c | 4 ++++<br>
1 files changed, 4 insertions(+), 0 deletions(-)<br>
<br>
diff --git a/src/core/mount.c b/src/core/mount.c<br>
index 2aaf78c..29ce440 100644<br>
--- a/src/core/mount.c<br>
+++ b/src/core/mount.c<br>
@@ -1488,6 +1488,10 @@ static int mount_add_one(<br>
goto fail;<br>
}<br>
<br>
+ r = unit_add_two_dependencies_by_name(u, UNIT_BEFORE, UNIT_REQUIRED_BY, SPECIAL_LOCAL_FS_TARGET, NULL, true);<br>
+ if (r < 0)<br>
+ goto fail;<br>
+<br>
unit_add_to_load_queue(u);<br>
} else {<br>
delete = false;<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.2.5<br>
<br>
</font></span></blockquote></div><br></div>