Revert "vmm: api: Modify FsConfig to be OpenAPI friendly"

This reverts commit defc5dcd9c.
This commit is contained in:
Sebastien Boeuf
2019-12-06 18:22:16 -08:00
committed by Rob Bradford
parent 9b1ba14f2d
commit aa94e9b8f3
3 changed files with 9 additions and 18 deletions

View File

@@ -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,