[systemd-devel] x-initrd.mount + shutdown umount logic question
Lennart Poettering
lennart at poettering.net
Mon Jun 17 11:49:59 PDT 2013
On Thu, 13.06.13 22:13, Colin Guthrie (gmane at colin.guthr.ie) wrote:
> Hi,
>
> If a mount has the x-initrd.mount option shouldn't it be excluded from
> the umount loop during shutdown?
>
> I've looked at the code but I don't see where they would be excluded.
>
> The reason I ask is that a user asked to exclude certain paths from the
> umount logic, but I didn't like the patch he presented which was very
> specific and one I'd have to carry downstream (it was used for live
> ISOs). I'm sure it could be solved in other ways too but one thought was
> the above option, but while I can see it's use in the fstab generator, I
> can't see where this info is used in the umounting spree where /usr and
> / are excluded specifically rather than using the result of the
> mount_in_initrd() function.
>
> Any thoughts?
Hmm, the final unmount loop at shutdown tries to brutally unmont
everything it can that is listed in the kernel. It does not check
fstab. x-initrd.mount is an fstab flag that the kernel doesn't know
about, so we cannot easily check for that.
In general, if something shall be excluded from the umount loop the best
is probably to simply pin it by keeping an fd to the mount open. I'd
really prefer if the umount loop would stay as simple and robust as it
can be.
Judging by the cited bug report it appears to me that this is solely
about cosmetics, so I wonder if could better find a cosmetic solution to
a cosmetic problem, and simply not show this output by default, or
something like that...
Lennart
--
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel
mailing list