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
Tony Hutter <hutter2@llnl.gov>Committed on Apr 22 2024, 4:23 PM
Parents
rGfa2cbd40078f: zvols: prevent overflow of minor device numbers
Branches
Unknown
Tags
Unknown

Event Timeline

Tony Hutter <hutter2@llnl.gov> committed rG3fb0942cc5fb: udev: correctly handle partition #16 and later (authored by Fabian-Gruenbichler <f.gruenbichler@proxmox.com>).Apr 22 2024, 4:23 PM