mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
Revert "vmm: api: Modify FsConfig to be OpenAPI friendly"
This reverts commit defc5dcd9c.
This commit is contained in:
committed by
Rob Bradford
parent
9b1ba14f2d
commit
aa94e9b8f3
@@ -974,8 +974,8 @@ impl DeviceManager {
|
||||
if let Some(fs_list_cfg) = &vm_info.vm_cfg.lock().unwrap().fs {
|
||||
for fs_cfg in fs_list_cfg.iter() {
|
||||
if let Some(fs_sock) = fs_cfg.sock.to_str() {
|
||||
let cache: Option<(VirtioSharedMemoryList, u64)> = if fs_cfg.dax {
|
||||
let fs_cache = fs_cfg.cache_size;
|
||||
let mut cache: Option<(VirtioSharedMemoryList, u64)> = None;
|
||||
if let Some(fs_cache) = fs_cfg.cache_size {
|
||||
// The memory needs to be 2MiB aligned in order to support
|
||||
// hugepages.
|
||||
let fs_guest_addr = allocator
|
||||
@@ -1020,18 +1020,15 @@ impl DeviceManager {
|
||||
offset: 0,
|
||||
len: fs_cache,
|
||||
});
|
||||
|
||||
Some((
|
||||
cache = Some((
|
||||
VirtioSharedMemoryList {
|
||||
addr: fs_guest_addr,
|
||||
len: fs_cache as GuestUsize,
|
||||
region_list,
|
||||
},
|
||||
addr as u64,
|
||||
))
|
||||
} else {
|
||||
None
|
||||
};
|
||||
));
|
||||
}
|
||||
|
||||
let virtio_fs_device = vm_virtio::vhost_user::Fs::new(
|
||||
fs_sock,
|
||||
|
||||
Reference in New Issue
Block a user