[systemd-devel] [PATCH] systemd-udevd.service: restore mount propagation
Lennart Poettering
lennart at poettering.net
Mon Jan 26 15:55:38 PST 2015
On Mon, 26.01.15 08:59, Dave Reisner (dreisner at archlinux.org) wrote:
> This reverts part of c2c13f2df42e0, which introduced this with no
> explanation as to *why*. Enslaving the mount namespace breaks default
> behavior included in rules/60-cdrom_id.rules. Specifically, filesystems
> on optical media will not be properly unmounted when the physical eject
> button is used in the absence of a helper tool like udisks2.
Hmm? I don't see how mount propagation would break 60-cdrom_id... The
eject ioctl operates on the device node, and does not care for
mounts. This problem sounds made-up to me.
Moreover, if you want to do mounts or umounts on plug or play, then
use a proper daemon, like udisks. And if you don#t want to do that,
then make systemd handle this: by setting up .mount and .device units
as needed. This has the great advantage that it can deal with full
mount heirarchies, and properly does this things in an asynchronous
way. udev rules are simply the wrong place to do mounts, they don't
belong there.
We sandbox all daemons we ship, as far as we can. Unfortunately since
udev is "pluggable" and rules may invoke external tools we cannot
sandbox too much. But we can certainly sandbox the mount propagation,
since we know that it's not the right place to do mounts. And so we
do.
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list