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.
For upstream issue and PR discussion see:
https://github.com/openzfs/zfs/pull/15970https://github.com/openzfs/zfs/issues/15904
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>