-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
udev: correctly handle partition #16 and later #15970
udev: correctly handle partition #16 and later #15970
Conversation
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. Fixes: openzfs#15904 Signed-off-by: Fabian Grünbichler <[email protected]>
As a reference, Amazon ships their Amazon Linux 2023 KVM disk image with partition ids 127 and 128. |
FWIW, I am fairly sure the test failure is not this PRs fault :) |
Hi there, do we have any idea when this will be merged in? Or if it's merged in a separate PR, could we link it to this one? I'm currently having this exact problem. |
I don't know about the timeline, but the fix is entirely in the udev helper, so if you know how to build ZFS, then it's fairly easy to build and deploy ;) |
@PaulArandjelovic the commit will be in our upcoming 2.2.4 release: #16107 |
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 <[email protected]> Reviewed by: Brian Behlendorf <[email protected]> Reviewed-by: Tino Reichardt <[email protected]> Signed-off-by: Fabian Grünbichler <[email protected]> Closes #15904 Closes #15970
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: openzfs/zfs#15970 openzfs/zfs#15904 Signed-off-by: Stoiko Ivanov <[email protected]> Signed-off-by: Thomas Lamprecht <[email protected]>
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 <[email protected]> Reviewed by: Brian Behlendorf <[email protected]> Reviewed-by: Tino Reichardt <[email protected]> Signed-off-by: Fabian Grünbichler <[email protected]> Closes openzfs#15904 Closes openzfs#15970
Motivation and Context
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.
Fixes: #15904
Description
Since the partition number is encoded in the block device name anyway, let's just extract it from there instead.
How Has This Been Tested?
Created a zvol with more than 15 partitions. Compared generated named symlinks with and without the fix.
Types of changes
Checklist:
Signed-off-by
.