HomeFreeBSD

udev: correctly handle partition #16 and later

Description

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

Details

Provenance
Fabian-Gruenbichler <f.gruenbichler@proxmox.com>Authored on Mar 21 2024, 11:38 PM
GitHub <noreply@github.com>Committed on Mar 21 2024, 11:38 PM
Parents
rG2c01cae8b9fa: BRT: Change brt_pending_tree sorting order
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rGf1b368359b39: udev: correctly handle partition #16 and later (authored by Fabian-Gruenbichler <f.gruenbichler@proxmox.com>).Mar 21 2024, 11:38 PM