diff --git a/io-engine/src/grpc/v1/host.rs b/io-engine/src/grpc/v1/host.rs index 8cc570390..002aafa5a 100644 --- a/io-engine/src/grpc/v1/host.rs +++ b/io-engine/src/grpc/v1/host.rs @@ -117,6 +117,8 @@ impl From for host_rpc::BlockDevice { partition: b.partition.map(host_rpc::Partition::from), filesystem: b.filesystem.map(host_rpc::Filesystem::from), available: b.available, + connection_type: b.connection_type, + is_rotational: b.is_rotational, } } } diff --git a/io-engine/src/host/blk_device.rs b/io-engine/src/host/blk_device.rs index f6b019703..bfb11b395 100644 --- a/io-engine/src/host/blk_device.rs +++ b/io-engine/src/host/blk_device.rs @@ -67,6 +67,8 @@ pub struct BlockDevice { pub partition: Option, pub filesystem: Option, pub available: bool, + pub connection_type: String, + pub is_rotational: Option, } impl From> for String { @@ -249,6 +251,9 @@ fn new_device( && (partition.is_none() || usable_partition(&partition)) && filesystem.is_none(); + let rotational_attribute: Option = + Property(device.attribute_value("queue/rotational")).into(); + return Some(BlockDevice { devname: String::from(devname.to_str().unwrap_or("")), devtype: Property(device.property_value("DEVTYPE")).into(), @@ -256,6 +261,8 @@ fn new_device( devmin: Property(device.property_value("MINOR")).into(), model: Property(device.property_value("ID_MODEL")).into(), devpath: Property(device.property_value("DEVPATH")).into(), + connection_type: Property(device.property_value("ID_BUS")).into(), + is_rotational: rotational_attribute.map(|s| s == "1"), devlinks: device .property_value("DEVLINKS") .and_then(|s| s.to_str()) diff --git a/utils/dependencies b/utils/dependencies index daadec90b..c2c076899 160000 --- a/utils/dependencies +++ b/utils/dependencies @@ -1 +1 @@ -Subproject commit daadec90b1d548190a90ddbddfdf68bc5f38f467 +Subproject commit c2c0768993263bf79063c9b7295ca38ec8d9dbb6