Skip to content

Commit

Permalink
fix(host-devices): extend allowed major list
Browse files Browse the repository at this point in the history
Extends major list with the Local/Experimental 240-254 range and 255 reserved.

Signed-off-by: Tiago Castro <tiagolobocastro@gmail.com>
  • Loading branch information
tiagolobocastro committed Sep 17, 2024
1 parent 819ab17 commit 3de2fca
Showing 1 changed file with 9 additions and 5 deletions.
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

0 comments on commit 3de2fca

Please sign in to comment.