Skip to content

Commit

Permalink
Merge #1740
Browse files Browse the repository at this point in the history
1740: fix(host-devices): extend allowed major list r=tiagolobocastro a=tiagolobocastro

Extends major list with the Local/Experimental 240-254 range and 255 reserved.

Co-authored-by: Tiago Castro <[email protected]>
  • Loading branch information
mayastor-bors and tiagolobocastro committed Sep 18, 2024
2 parents 819ab17 + 3de2fca commit 40572c9
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 40572c9

Please sign in to comment.