mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-10-21 20:08:54 +00:00
runtime-rs: add support spdk/vhost-user based volume.
Unlike the previous usage which requires creating /dev/xxx by mknod on the host, the new approach will fully utilize the DirectVolume-related usage method, and pass the spdk controller to vmm. And a user guide about using the spdk volume when run a kata-containers. it can be found in docs/how-to. Fixes: #6526 Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
This commit is contained in:
@@ -114,6 +114,8 @@ pub enum BlockDeviceType {
|
||||
/// SPOOL is a reliable NVMe virtualization system for the cloud environment.
|
||||
/// You could learn more SPOOL here: https://www.usenix.org/conference/atc20/presentation/xue
|
||||
Spool,
|
||||
/// The standard vhost-user-blk based device such as Spdk device.
|
||||
Spdk,
|
||||
/// Local disk/file based low level device.
|
||||
RawBlock,
|
||||
}
|
||||
@@ -124,6 +126,8 @@ impl BlockDeviceType {
|
||||
// SPOOL path should be started with "spool", e.g. "spool:/device1"
|
||||
if path.starts_with("spool:/") {
|
||||
BlockDeviceType::Spool
|
||||
} else if path.starts_with("spdk:/") {
|
||||
BlockDeviceType::Spdk
|
||||
} else {
|
||||
BlockDeviceType::RawBlock
|
||||
}
|
||||
@@ -400,6 +404,10 @@ impl BlockDeviceMgr {
|
||||
BlockDeviceError::DeviceManager(e)
|
||||
})
|
||||
}
|
||||
BlockDeviceType::Spool | BlockDeviceType::Spdk => {
|
||||
// TBD
|
||||
todo!()
|
||||
}
|
||||
_ => Err(BlockDeviceError::InvalidBlockDeviceType),
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user