]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
udev: correctly handle partition #16 and later
authorFabian-Gruenbichler <f.gruenbichler@proxmox.com>
Thu, 21 Mar 2024 23:38:24 +0000 (00:38 +0100)
committerGitHub <noreply@github.com>
Thu, 21 Mar 2024 23:38:24 +0000 (16:38 -0700)
commitf1b368359b3970f7995a6dcb088fdadb31840f4d
tree7a6c30163320d07b0ee0a24b9c86a2a43d7c22eb
parent2c01cae8b9faca5766629aa45b2bfabaeae92e4d
udev: correctly handle partition #16 and later

If a zvol has more than 15 partitions, the minor device number exhausts
the slot count reserved for partitions next to the zvol itself. As a
result, the minor number cannot be used to determine the partition
number for the higher partition, and doing so results in wrong named
symlinks being generated by udev.

Since the partition number is encoded in the block device name anyway,
let's just extract it from there instead.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Closes #15904
Closes #15970
udev/zvol_id.c