mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-22 11:22:26 +00:00
vm-virtio: Move fs.rs to vhost_user module
vhost-user-net introduced a new module vhost_user inside the vm-virtio crate. Because virtio-fs is actually vhost-user-fs, it belongs to this new module and needs to be moved there. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
parent
cc7a96e9d3
commit
56cad00f2e
@ -23,7 +23,6 @@ use std::io;
|
||||
mod block;
|
||||
mod console;
|
||||
mod device;
|
||||
pub mod fs;
|
||||
pub mod net;
|
||||
mod pmem;
|
||||
mod queue;
|
||||
@ -35,7 +34,6 @@ pub mod vhost_user;
|
||||
pub use self::block::*;
|
||||
pub use self::console::*;
|
||||
pub use self::device::*;
|
||||
pub use self::fs::*;
|
||||
pub use self::net::*;
|
||||
pub use self::pmem::*;
|
||||
pub use self::queue::*;
|
||||
@ -126,7 +124,7 @@ pub enum ActivateError {
|
||||
/// Failed to create Vhost-user interrupt eventfd
|
||||
VhostIrqCreate,
|
||||
/// Failed to setup vhost-user daemon.
|
||||
VhostUserSetup(fs::Error),
|
||||
VhostUserSetup(vhost_user::fs::Error),
|
||||
/// Failed to setup vhost-user daemon.
|
||||
VhostUserNetSetup(vhost_user::Error),
|
||||
}
|
||||
@ -153,7 +151,4 @@ pub enum Error {
|
||||
EpollCtl(io::Error),
|
||||
EpollWait(io::Error),
|
||||
FailedSignalingDriver(io::Error),
|
||||
|
||||
/// Failed to handle vhost-user slave request.
|
||||
VhostUserSlaveRequest(vhost_rs::vhost_user::Error),
|
||||
}
|
||||
|
@ -2,9 +2,10 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use super::Error as DeviceError;
|
||||
use super::{ActivateError, ActivateResult, Queue, VirtioDevice, VirtioDeviceType};
|
||||
use crate::{
|
||||
VirtioInterrupt, VirtioInterruptType, VirtioSharedMemoryList, VIRTIO_F_VERSION_1_BITMASK,
|
||||
ActivateError, ActivateResult, Queue, VirtioDevice, VirtioDeviceType,
|
||||
VirtioInterrupt, VirtioInterruptType, VirtioSharedMemoryList,
|
||||
VIRTIO_F_VERSION_1_BITMASK,
|
||||
};
|
||||
use epoll;
|
||||
use libc::{self, EFD_NONBLOCK};
|
@ -12,10 +12,12 @@ use std::io;
|
||||
use vhost_rs::Error as VhostError;
|
||||
use vm_memory::Error as MmapError;
|
||||
|
||||
pub mod fs;
|
||||
mod handler;
|
||||
pub mod net;
|
||||
pub mod vu_common_ctrl;
|
||||
|
||||
pub use self::fs::*;
|
||||
pub use self::net::Net;
|
||||
pub use self::vu_common_ctrl::VhostUserConfig;
|
||||
|
||||
@ -81,6 +83,8 @@ pub enum Error {
|
||||
VhostIrqRead(io::Error),
|
||||
/// Failed to read vhost eventfd.
|
||||
VhostUserMemoryRegion(MmapError),
|
||||
/// Failed to handle vhost-user slave request.
|
||||
VhostUserSlaveRequest(vhost_rs::vhost_user::Error),
|
||||
/// Invalid used address.
|
||||
UsedAddress,
|
||||
}
|
||||
|
@ -250,7 +250,7 @@ pub enum DeviceManagerError {
|
||||
CreateVirtioRng(io::Error),
|
||||
|
||||
/// Cannot create virtio-fs device
|
||||
CreateVirtioFs(vm_virtio::fs::Error),
|
||||
CreateVirtioFs(vm_virtio::vhost_user::fs::Error),
|
||||
|
||||
/// Cannot create virtio-pmem device
|
||||
CreateVirtioPmem(io::Error),
|
||||
@ -968,7 +968,7 @@ impl DeviceManager {
|
||||
));
|
||||
}
|
||||
|
||||
let virtio_fs_device = vm_virtio::Fs::new(
|
||||
let virtio_fs_device = vm_virtio::vhost_user::Fs::new(
|
||||
fs_sock,
|
||||
fs_cfg.tag,
|
||||
fs_cfg.num_queues,
|
||||
|
Loading…
x
Reference in New Issue
Block a user