udev: re-introduce symlinks for loopback block device
But the directories are changed from /dev/loop/by-ref/ -> /dev/disk/by-loop-ref/ and /dev/loop/by-inode/ -> /dev/disk/by-loop-inode/. As /dev/loop/ is used by losetup command for other purpose. See issue #28475. This effectively reverts commits9915cc6086,5022fab15f, andc0d998248e.
This commit is contained in:
@@ -1156,7 +1156,11 @@ 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. */
|
||||
* 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/disk/by-loop-ref/ symlinks, and similar, so that apps can
|
||||
* recognize their own loopback files. */
|
||||
|
||||
if (name && strlen(name) >= sizeof(info.lo_file_name))
|
||||
return -ENOBUFS;
|
||||
|
||||
Reference in New Issue
Block a user