[systemd-devel] [PATCH 1/2] core: keep mountinfo .mounts until late shutdown
zbyszek at in.waw.pl
Thu Feb 14 12:15:28 PST 2013
On Mon, Feb 04, 2013 at 05:27:24PM +0100, Umut Tezduyar wrote:
> On Mon, Feb 4, 2013 at 4:23 PM, Zbigniew Jędrzejewski-Szmek <
> zbyszek at in.waw.pl> wrote:
> > Hi,
> > On Mon, Feb 04, 2013 at 03:03:59PM +0100, Umut Tezduyar wrote:
> > > Downside of this patch is, mountinfo mounts stick around as inactive-dead
> > > even when the file system they represent is unmounted.
> > >
> > >
> > > On Mon, Feb 4, 2013 at 3:00 PM, Umut Tezduyar <umut at tezduyar.com> wrote:
> > >
> > > > .mount units coming from /proc/self/mountinfo file are
> > > > unmounted after local-fs.target is reached during shutdown.
> > > >
> > > > Problem: .mount units popping up in mountinfo file are
> > > > added to systemd without any dependency. For that reason,
> > Hm, what do you mean exactly by that? Mount units I see have dependencies
> > on mount points higher in the hierarchy. E.g.
> > Requires=systemd-journald.socket -.mount home.mount
> > After=systemd-journald.socket -.mount home.mount
> > Description=/home/zbyszek/debian-x32/home
> > SourcePath=/proc/self/mountinfo
> Mount units have dependencies on higher mount points but they do not have
> default dependencies like local-fs-pre.target, local-fs.target,
> umount.target. You can compare a mount unit coming from /etc/fstab with one
I think that an addition of relationships with other units is necessary.
But adding RequiredBy=local-fs.target,Before=local-fs.target doesn't
seem to be the right combination.
Before=local-fs.target -> OK.
RequiredBy=local-fs.target -> This one doesn't seem to be necessary. In
practice there's little difference since alread-mounted mounts can't
"fail", but it's better to keep the dependency graph sparse.
Conflicts=umount.target -> I think that we want this one. Without this,
mounts added by hand will be left till the very end, but there's
no reason to make them special like this.
More information about the systemd-devel