diff options
author | Franck Bui <fbui@suse.com> | 2016-12-16 17:13:58 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-12-16 17:13:58 +0100 |
commit | ebc8968bc0b6fc460099041f5ae1262ca17eeb6e (patch) | |
tree | a1c3593e691fae26283c8bf2f38649c1e33b15d8 /man | |
parent | d6ccb4f9428102ac784f8ebd5d937d5363146c1d (diff) |
core: make mount units from /proc/self/mountinfo possibly bind to a device (#4515)
Since commit 9d06297, mount units from mountinfo are not bound to their devices
anymore (they use the "Requires" dependency instead).
This has the following drawback: if a media is mounted and the eject button is
pressed then the media is unconditionally ejected leaving some inconsistent
states.
Since udev is the component that is reacting (no matter if the device is used
or not) to the eject button, users expect that udev at least try to unmount the
media properly.
This patch introduces a new property "SYSTEMD_MOUNT_DEVICE_BOUND". When set on
a block device, all units that requires this device will see their "Requires"
dependency upgraded to a "BindTo" one. This is currently only used by cdrom
devices.
This patch also gives the possibility to the user to restore the previous
behavior that is bind a mount unit to a device. This is achieved by passing the
"x-systemd.device-bound" option to mount(8). Please note that currently this is
not working because libmount treats the x-* options has comments therefore
they're not available in utab for later application retrievals.
Diffstat (limited to 'man')
-rw-r--r-- | man/systemd.mount.xml | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/man/systemd.mount.xml b/man/systemd.mount.xml index 68ff6f8f1c..2117433bf0 100644 --- a/man/systemd.mount.xml +++ b/man/systemd.mount.xml @@ -206,6 +206,19 @@ </varlistentry> <varlistentry> + <term><option>x-systemd.device-bound</option></term> + + <listitem><para>The block device backed file system will be upgraded + to <varname>BindsTo=</varname> dependency. This option is only useful + when mounting file systems manually with + <citerefentry><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry> + as the default dependency in this case is <varname>Requires=</varname>. + This option is already implied by entries in <filename>/etc/fstab</filename> + or by mount units. + </para></listitem> + </varlistentry> + + <varlistentry> <term><option>x-systemd.automount</option></term> <listitem><para>An automount unit will be created for the file |