]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tree-wide: drop references to /dev/loop/by-ref
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 21 Jul 2023 01:24:17 +0000 (10:24 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 21 Jul 2023 01:24:20 +0000 (10:24 +0900)
Follow-up for #28476.

NEWS
man/systemd-dissect.xml
src/shared/loop-util.c

diff --git a/NEWS b/NEWS
index 3da7a15aa64e5c8b49c1ad7dc82064887fd80b83..50339e7724de5667029707e60b1ba2a8d47216f7 100644 (file)
--- 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.
index 2b8620a5f0e9f2ade9d859da5f9afc2f6a36ce89..9a3ed6ce7b2059b59ee34eda2f6747bf55be04a2 100644 (file)
         <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>
index 09841ae26ae827515c91e665a57838390e45ac30..9c31d265b6f4d016c1301338f03d62e12d27d60b 100644 (file)
@@ -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;