[systemd-devel] [PATCH] systemd-udevd.service: restore mount propagation

Martin Pitt martin.pitt at ubuntu.com
Wed Jan 28 05:09:37 PST 2015

Lennart Poettering [2015-01-28 13:33 +0100]:
> Hmm, yeah, we apparently only add that for file systems listed in
> /etc/fstab...
> If you change the "get_mount_parameters_fragment()" invocation at the
> beginning of mount_add_device_links() in src/core/mount.c to
> "get_mount_parameters()", does this make things work for you?
> This change might have more effects than just making this work, but I
> think it's the right thing to do. Could you test please?

BAZINGA! Thanks for this, now it works perfectly! Now the mount unit
looks like this:

| Where=/media/martin/Ubuntu 15.04 amd64
| What=/dev/sr0
| [...]
| Id=media-martin-Ubuntu\x5cx2015.04\x5cx20amd64.mount
| Names=media-martin-Ubuntu\x5cx2015.04\x5cx20amd64.mount
| Requires=-.mount
| Wants=system.slice
| BindsTo=dev-sr0.device
| WantedBy=dev-sr0.device
| Conflicts=umount.target
| Before=local-fs.target umount.target
| After=system.slice -.mount local-fs-pre.target systemd-journald.socket dev-sr0.device
| [...]

and requesting the CD eject causes cdrom_id --eject, which triggers
the new DISK_MEDIA_CHANGE rule, which stops the .device unit, which in
turn stops the .mount unit.

Patches attached for both parts of the issue. The first one is really
"your" patch, so please do commit yourself if you prefer (feel free to
steal any or all of my patch description, of course).

I'll also adjust the fd.o bug report accordingly.


Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-core-mount-add-dependencies-to-dynamically-mounted-m.patch
Type: text/x-diff
Size: 994 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150128/e0a08fd7/attachment-0002.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-rules-clean-up-stale-CD-drive-mounts-after-ejection.patch
Type: text/x-diff
Size: 1635 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150128/e0a08fd7/attachment-0003.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150128/e0a08fd7/attachment-0001.sig>

More information about the systemd-devel mailing list