mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-07-01 22:50:54 +00:00
kata-types: add virtio-fs-nydus shared fs configuration support
Add "virtio-fs-nydus" as a recognized shared filesystem type in the hypervisor configuration. This enables the standalone nydusd mode where nydusd runs as a separate process alongside virtiofsd. The key changes: (1) Add VIRTIO_FS_NYDUS constant for the new shared fs type. (2) Register virtio-fs-nydus in adjust() and validate() paths, reusing the same virtio-fs validation logic since both use vhost-user protocol Signed-off-by: Alex Lyn <alex.lyn@antgroup.com>
This commit is contained in:
committed by
Fabiano Fidêncio
parent
8f5b898e6d
commit
b50f803a4e
@@ -70,6 +70,7 @@ pub use self::firecracker::{FirecrackerConfig, HYPERVISOR_NAME_FIRECRACKER};
|
||||
const NO_VIRTIO_FS: &str = "none";
|
||||
const VIRTIO_FS: &str = "virtio-fs";
|
||||
const VIRTIO_FS_INLINE: &str = "inline-virtio-fs";
|
||||
const VIRTIO_FS_NYDUS: &str = "virtio-fs-nydus";
|
||||
const MAX_BRIDGE_SIZE: u32 = 5;
|
||||
const MAX_NETWORK_QUEUES: u32 = 256;
|
||||
|
||||
@@ -1528,6 +1529,7 @@ impl SharedFsInfo {
|
||||
match self.shared_fs.as_deref() {
|
||||
Some(VIRTIO_FS) => self.adjust_virtio_fs(false)?,
|
||||
Some(VIRTIO_FS_INLINE) => self.adjust_virtio_fs(true)?,
|
||||
Some(VIRTIO_FS_NYDUS) => self.adjust_virtio_fs(false)?,
|
||||
_ => {}
|
||||
}
|
||||
|
||||
@@ -1543,6 +1545,7 @@ impl SharedFsInfo {
|
||||
None => Ok(()),
|
||||
Some(VIRTIO_FS) => self.validate_virtio_fs(false),
|
||||
Some(VIRTIO_FS_INLINE) => self.validate_virtio_fs(true),
|
||||
Some(VIRTIO_FS_NYDUS) => self.validate_virtio_fs(false),
|
||||
Some(v) => Err(std::io::Error::other(format!("Invalid shared_fs type {v}"))),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user