udev: decrease devlink priority for iso disks
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 21 Jul 2023 02:39:45 +0000 (11:39 +0900)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 21 Jul 2023 10:42:34 +0000 (11:42 +0100)
commitdf1dccd25547b430258bd42ec60428fc9aff1370
treef76ffa1bb9249b93d6c1045f5beb4ce309a4fc80
parentdc3b5e0432489c87353108396a6854b3f9690380
udev: decrease devlink priority for iso disks

Previously, if the priority is same, devlinks are always replaced by
newer events. The commit 331aa7aa15ee5dd12b369b276f575d521435eb52 changes
that to keep the existing devlink. That should not change any behavior
when the devices that request the same symlink do not have any
dependency, e.g. when /dev/sda1 and /dev/adb1 request the same
/dev/disk/by-label symlink, as there are no guarantee that which device
is processed first.

However, when devices has dependency, e.g. /dev/sda and /dev/sda1
request the same /dev/disk/by-label symlink, previously the symlink
always pointed to the partition, as the partition is always processed
later. But, 331aa7aa15ee5dd12b369b276f575d521435eb52 makes the symlink
point to the whole disk.

The change by 331aa7aa15ee5dd12b369b276f575d521435eb52 is crucial to
improve performance of devlink handling, especially when a system has
large number of disks with same label or so. Hence, cannot and should
not be reverted.

So, let's workaround the case, as such situation should happen only when
the disk is a hybrind ISO image, I guess.

Fixes #28468.
rules.d/60-persistent-storage.rules.in