From 3de2fcaf1a3cfbd88d2d90c659243dfce6645562 Mon Sep 17 00:00:00 2001 From: Tiago Castro Date: Tue, 17 Sep 2024 22:38:02 +0100 Subject: [PATCH] fix(host-devices): extend allowed major list Extends major list with the Local/Experimental 240-254 range and 255 reserved. Signed-off-by: Tiago Castro --- io-engine/src/host/blk_device.rs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/io-engine/src/host/blk_device.rs b/io-engine/src/host/blk_device.rs index bfb11b395..4c0ea9e25 100644 --- a/io-engine/src/host/blk_device.rs +++ b/io-engine/src/host/blk_device.rs @@ -110,10 +110,14 @@ impl From> 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 ]; @@ -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,