mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-08-20 15:01:16 +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 block;
|
||||||
mod console;
|
mod console;
|
||||||
mod device;
|
mod device;
|
||||||
pub mod fs;
|
|
||||||
pub mod net;
|
pub mod net;
|
||||||
mod pmem;
|
mod pmem;
|
||||||
mod queue;
|
mod queue;
|
||||||
@ -35,7 +34,6 @@ pub mod vhost_user;
|
|||||||
pub use self::block::*;
|
pub use self::block::*;
|
||||||
pub use self::console::*;
|
pub use self::console::*;
|
||||||
pub use self::device::*;
|
pub use self::device::*;
|
||||||
pub use self::fs::*;
|
|
||||||
pub use self::net::*;
|
pub use self::net::*;
|
||||||
pub use self::pmem::*;
|
pub use self::pmem::*;
|
||||||
pub use self::queue::*;
|
pub use self::queue::*;
|
||||||
@ -126,7 +124,7 @@ pub enum ActivateError {
|
|||||||
/// Failed to create Vhost-user interrupt eventfd
|
/// Failed to create Vhost-user interrupt eventfd
|
||||||
VhostIrqCreate,
|
VhostIrqCreate,
|
||||||
/// Failed to setup vhost-user daemon.
|
/// Failed to setup vhost-user daemon.
|
||||||
VhostUserSetup(fs::Error),
|
VhostUserSetup(vhost_user::fs::Error),
|
||||||
/// Failed to setup vhost-user daemon.
|
/// Failed to setup vhost-user daemon.
|
||||||
VhostUserNetSetup(vhost_user::Error),
|
VhostUserNetSetup(vhost_user::Error),
|
||||||
}
|
}
|
||||||
@ -153,7 +151,4 @@ pub enum Error {
|
|||||||
EpollCtl(io::Error),
|
EpollCtl(io::Error),
|
||||||
EpollWait(io::Error),
|
EpollWait(io::Error),
|
||||||
FailedSignalingDriver(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
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
use super::Error as DeviceError;
|
use super::Error as DeviceError;
|
||||||
use super::{ActivateError, ActivateResult, Queue, VirtioDevice, VirtioDeviceType};
|
|
||||||
use crate::{
|
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 epoll;
|
||||||
use libc::{self, EFD_NONBLOCK};
|
use libc::{self, EFD_NONBLOCK};
|
@ -12,10 +12,12 @@ use std::io;
|
|||||||
use vhost_rs::Error as VhostError;
|
use vhost_rs::Error as VhostError;
|
||||||
use vm_memory::Error as MmapError;
|
use vm_memory::Error as MmapError;
|
||||||
|
|
||||||
|
pub mod fs;
|
||||||
mod handler;
|
mod handler;
|
||||||
pub mod net;
|
pub mod net;
|
||||||
pub mod vu_common_ctrl;
|
pub mod vu_common_ctrl;
|
||||||
|
|
||||||
|
pub use self::fs::*;
|
||||||
pub use self::net::Net;
|
pub use self::net::Net;
|
||||||
pub use self::vu_common_ctrl::VhostUserConfig;
|
pub use self::vu_common_ctrl::VhostUserConfig;
|
||||||
|
|
||||||
@ -81,6 +83,8 @@ pub enum Error {
|
|||||||
VhostIrqRead(io::Error),
|
VhostIrqRead(io::Error),
|
||||||
/// Failed to read vhost eventfd.
|
/// Failed to read vhost eventfd.
|
||||||
VhostUserMemoryRegion(MmapError),
|
VhostUserMemoryRegion(MmapError),
|
||||||
|
/// Failed to handle vhost-user slave request.
|
||||||
|
VhostUserSlaveRequest(vhost_rs::vhost_user::Error),
|
||||||
/// Invalid used address.
|
/// Invalid used address.
|
||||||
UsedAddress,
|
UsedAddress,
|
||||||
}
|
}
|
||||||
|
@ -250,7 +250,7 @@ pub enum DeviceManagerError {
|
|||||||
CreateVirtioRng(io::Error),
|
CreateVirtioRng(io::Error),
|
||||||
|
|
||||||
/// Cannot create virtio-fs device
|
/// Cannot create virtio-fs device
|
||||||
CreateVirtioFs(vm_virtio::fs::Error),
|
CreateVirtioFs(vm_virtio::vhost_user::fs::Error),
|
||||||
|
|
||||||
/// Cannot create virtio-pmem device
|
/// Cannot create virtio-pmem device
|
||||||
CreateVirtioPmem(io::Error),
|
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_sock,
|
||||||
fs_cfg.tag,
|
fs_cfg.tag,
|
||||||
fs_cfg.num_queues,
|
fs_cfg.num_queues,
|
||||||
|
Loading…
Reference in New Issue
Block a user