Skip to content
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

incusd/device/disk: Better handle partitions #1578

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

stgraber
Copy link
Member

Our disk I/O limits logic was assuming that the disk block device major/minor could be derived from the partition major/minor.

This may still be true on some block device drivers, but in general now, it's common to have a single major shared by multiple drives, making this logic lead to the incorrect device.

Instead we now keep track of partitions when scanning block devices and maintain a map from the partition major/minor back to its parent disk.

Sponsored-by: https://webdock.io

Our disk I/O limits logic was assuming that the disk block device
major/minor could be derived from the partition major/minor.

This may still be true on some block device drivers, but in general now,
it's common to have a single major shared by multiple drives, making
this logic lead to the incorrect device.

Instead we now keep track of partitions when scanning block devices and
maintain a map from the partition major/minor back to its parent disk.

Signed-off-by: Stéphane Graber <[email protected]>
Sponsored-by: https://webdock.io
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant