From c0d998248e10e1dcf18108fdbb70f259acd452eb Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Fri, 21 Jul 2023 10:24:17 +0900 Subject: tree-wide: drop references to /dev/loop/by-ref Follow-up for #28476. --- NEWS | 15 --------------- man/systemd-dissect.xml | 8 +------- src/shared/loop-util.c | 6 +----- 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 @@ .lo_file_name field for the block device. Note this is distinct from the /sys/class/block/loopX/loop/backing_file 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. - - This setting is particularly useful in combination with the command, - as it allows later referencing the allocated loop device via /dev/loop/by-ref/… - symlinks. Example: first, set up the loopback device via systemd-dissect attach - --loop-ref=quux foo.raw, and then reference it in a command via the specified filename: - cfdisk /dev/loop/by-ref/quux. + former is not. 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; -- cgit v1.2.3