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

fix(host-devices): extend allowed major list #1740

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions io-engine/src/host/blk_device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,14 @@ impl From<Property<'_>> for u64 {
// Determine the type of devices which may be potentially presented
// as "available" for use.
fn usable_device(devmajor: &u32) -> bool {
const DEVICE_TYPES: [u32; 4] = [
7, // Loopback devices
8, // SCSI disk devices
43, // Network block devices
const DEVICE_TYPES: [u32; 20] = [
7, // Loopback devices
8, // SCSI disk devices
43, // Network block devices
// START 240-254 block
240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253,
254, // END
255, // Reserved
259, // Block Extended Major
];

Expand Down Expand Up @@ -230,7 +234,7 @@ fn new_filesystem(

// Create a new BlockDevice object from collected information.
// This function also contains the logic for determining whether
// or not the device that this represents is "available" for use.
// the device that this represents is "available" for use.
fn new_device(
parent: Option<&str>,
include: bool,
Expand Down