summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-07-21 03:24:17 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2023-07-21 03:24:20 +0200
commitc0d998248e10e1dcf18108fdbb70f259acd452eb (patch)
tree67ebff536f4bd72f1995cbbac6645d9f1154f75b
parentMerge pull request #28476 from bluca/revert_loop_links (diff)
downloadsystemd-c0d998248e10e1dcf18108fdbb70f259acd452eb.tar.xz
systemd-c0d998248e10e1dcf18108fdbb70f259acd452eb.zip
tree-wide: drop references to /dev/loop/by-ref
Follow-up for #28476.
-rw-r--r--NEWS15
-rw-r--r--man/systemd-dissect.xml8
-rw-r--r--src/shared/loop-util.c6
3 files changed, 2 insertions, 27 deletions
diff --git a/NEWS b/NEWS
index 3da7a15aa6..50339e7724 100644
--- a/NEWS
+++ b/NEWS
@@ -511,21 +511,6 @@ CHANGES WITH 254 in spe:
* udevadm gained the new "verify" verb for validating udev rules files
offline.
- * udev will now create symlinks to loopback block devices in the
- /dev/loop/by-ref/ directory that are based on the .lo_file_name
- string field selected during allocation. The systemd-dissect tool and
- the util-linux losetup command now supports a complementing new
- switch --loop-ref= for selecting the string. This means a loopback
- block device may now be allocated under a caller-chosen reference and
- can subsequently be referenced by that without first having to look
- up the block device name the caller ended up with.
-
- * udev also creates symlinks to loopback block devices in the
- /dev/loop/by-ref/ directory based on the .st_dev/st_ino fields of the
- inode attached to the loopback block device. This means that attaching
- a file to a loopback device will implicitly make a handle available to
- be found via that file's inode information.
-
* udev gained a new tool "iocost" that can be used to configure QoS IO
cost data based on hwdb information onto suitable block devices. Also
see https://github.com/iocost-benchmark/iocost-benchmarks.
diff --git a/man/systemd-dissect.xml b/man/systemd-dissect.xml
index 2b8620a5f0..9a3ed6ce7b 100644
--- a/man/systemd-dissect.xml
+++ b/man/systemd-dissect.xml
@@ -413,13 +413,7 @@
<literal>.lo_file_name</literal> field for the block device. Note this is distinct from the
<filename>/sys/class/block/loopX/loop/backing_file</filename> attribute file that always reports a
path referring to the actual backing file. The latter is subject to mount namespace translation, the
- former is not.</para>
-
- <para>This setting is particularly useful in combination with the <option>--attach</option> command,
- as it allows later referencing the allocated loop device via <filename>/dev/loop/by-ref/…</filename>
- symlinks. Example: first, set up the loopback device via <command>systemd-dissect attach
- --loop-ref=quux foo.raw</command>, and then reference it in a command via the specified filename:
- <command>cfdisk /dev/loop/by-ref/quux</command>.</para></listitem>
+ former is not.</para></listitem>
</varlistentry>
<varlistentry>
diff --git a/src/shared/loop-util.c b/src/shared/loop-util.c
index 09841ae26a..9c31d265b6 100644
--- a/src/shared/loop-util.c
+++ b/src/shared/loop-util.c
@@ -1156,11 +1156,7 @@ int loop_device_set_filename(LoopDevice *d, const char *name) {
/* Sets the .lo_file_name of the loopback device. This is supposed to contain the path to the file
* backing the block device, but is actually just a free-form string you can pass to the kernel. Most
* tools that actually care for the backing file path use the sysfs attribute file loop/backing_file
- * which is a kernel generated string, subject to file system namespaces and such.
- *
- * .lo_file_name is useful since userspace can select it freely when creating a loopback block
- * device, and we can use it for /dev/loop/by-ref/ symlinks, and similar, so that apps can recognize
- * their own loopback files. */
+ * which is a kernel generated string, subject to file system namespaces and such. */
if (name && strlen(name) >= sizeof(info.lo_file_name))
return -ENOBUFS;