zfs/udev
Fabian-Gruenbichler f1b368359b
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
2024-03-21 16:38:24 -07:00
..
rules.d autoconf: use include directives instead of recursing down udev 2022-05-10 10:19:36 -07:00
.gitignore cmd: move single-file binaries up, extract udev programs to udev/ 2022-05-10 10:20:34 -07:00
Makefile.am cmd: move single-file binaries up, extract udev programs to udev/ 2022-05-10 10:20:34 -07:00
vdev_id cmd: move single-file binaries up, extract udev programs to udev/ 2022-05-10 10:20:34 -07:00
zvol_id.c udev: correctly handle partition #16 and later 2024-03-21 16:38:24 -07:00