[systemd-devel] [PATCH] core/mount: only add dependencies to active units for dynamic mounts [was: Re: unit: When stopping due to BindsTo=, log which unit caused it]

Colin Walters walters at verbum.org
Thu Feb 26 10:05:07 PST 2015


Hi Martin, thanks for looking into this.

On Thu, Feb 26, 2015, at 12:43 PM, Martin Pitt wrote:

> The attached patch does that. It's not really pretty, but it works for
> me: mounts in the initramfs are now left alone, and the automatic
> unmount of force-ejected media is still working.

The patch description seems wrong to me; "systemctl status /dev/vda1" clearly
shows the device units are active while i'm in the initramfs.

I haven't tried your patch, but I do suspect it will work.  But why touch
the other bits of code?  Why not just do:

if (!is_fragment)
    return 0;

?

in mount.c?

I'd title the resulting patch something like "Only add device dependencies for fragment mounts" or
"Don't add device dependencies for dynamic mounts".


More information about the systemd-devel mailing list