Skip to content

Commit 40572c9

Browse files
mayastor-borstiagolobocastro
mayastor-bors
andcommitted
Merge #1740
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 <tiagolobocastro@gmail.com>
2 parents 819ab17 + 3de2fca commit 40572c9

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

io-engine/src/host/blk_device.rs

+9-5
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,14 @@ impl From<Property<'_>> for u64 {
110110
// Determine the type of devices which may be potentially presented
111111
// as "available" for use.
112112
fn usable_device(devmajor: &u32) -> bool {
113-
const DEVICE_TYPES: [u32; 4] = [
114-
7, // Loopback devices
115-
8, // SCSI disk devices
116-
43, // Network block devices
113+
const DEVICE_TYPES: [u32; 20] = [
114+
7, // Loopback devices
115+
8, // SCSI disk devices
116+
43, // Network block devices
117+
// START 240-254 block
118+
240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253,
119+
254, // END
120+
255, // Reserved
117121
259, // Block Extended Major
118122
];
119123

@@ -230,7 +234,7 @@ fn new_filesystem(
230234

231235
// Create a new BlockDevice object from collected information.
232236
// This function also contains the logic for determining whether
233-
// or not the device that this represents is "available" for use.
237+
// the device that this represents is "available" for use.
234238
fn new_device(
235239
parent: Option<&str>,
236240
include: bool,

0 commit comments

Comments
 (0)