mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-30 04:34:27 +00:00
runtime-rs: change cache mode
use never as the cache mode if none is configured Fixes:#6020 Signed-off-by: Zhongtao Hu <zhongtaohu.tim@linux.alibaba.com>
This commit is contained in:
parent
a33a22ccd1
commit
6199b69178
@ -32,7 +32,7 @@ use regex::RegexSet;
|
|||||||
|
|
||||||
use super::{default, ConfigOps, ConfigPlugin, TomlConfig};
|
use super::{default, ConfigOps, ConfigPlugin, TomlConfig};
|
||||||
use crate::annotations::KATA_ANNO_CFG_HYPERVISOR_PREFIX;
|
use crate::annotations::KATA_ANNO_CFG_HYPERVISOR_PREFIX;
|
||||||
use crate::{eother, resolve_path, validate_path};
|
use crate::{eother, resolve_path, sl, validate_path};
|
||||||
|
|
||||||
mod dragonball;
|
mod dragonball;
|
||||||
pub use self::dragonball::{DragonballConfig, HYPERVISOR_NAME_DRAGONBALL};
|
pub use self::dragonball::{DragonballConfig, HYPERVISOR_NAME_DRAGONBALL};
|
||||||
@ -850,6 +850,10 @@ impl SharedFsInfo {
|
|||||||
if self.virtio_fs_cache.is_empty() {
|
if self.virtio_fs_cache.is_empty() {
|
||||||
self.virtio_fs_cache = default::DEFAULT_VIRTIO_FS_CACHE_MODE.to_string();
|
self.virtio_fs_cache = default::DEFAULT_VIRTIO_FS_CACHE_MODE.to_string();
|
||||||
}
|
}
|
||||||
|
if self.virtio_fs_cache == *"none" {
|
||||||
|
warn!(sl!(), "virtio-fs cache mode `none` is deprecated since Kata Containers 2.5.0 and will be removed in the future release, please use `never` instead. For more details please refer to https://github.com/kata-containers/kata-containers/issues/4234.");
|
||||||
|
self.virtio_fs_cache = default::DEFAULT_VIRTIO_FS_CACHE_MODE.to_string();
|
||||||
|
}
|
||||||
if self.virtio_fs_is_dax && self.virtio_fs_cache_size == 0 {
|
if self.virtio_fs_is_dax && self.virtio_fs_cache_size == 0 {
|
||||||
self.virtio_fs_cache_size = default::DEFAULT_VIRTIO_FS_DAX_SIZE_MB;
|
self.virtio_fs_cache_size = default::DEFAULT_VIRTIO_FS_DAX_SIZE_MB;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user