mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vhost_user_block, virtio-devices, block_util: Extract common block code
Extract the code that is used by vhost_user_block from the virtio-devices crate to remove the dependencies on unrequired functionality such as the virtio transports. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
@@ -5,6 +5,7 @@ authors = ["The Cloud Hypervisor Authors"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
block_util = { path = "../block_util" }
|
||||
clap = { version = "2.33.1", features=["wrap_help"] }
|
||||
epoll = ">=4.0.1"
|
||||
libc = "0.2.72"
|
||||
@@ -14,6 +15,5 @@ qcow = { path = "../qcow" }
|
||||
vhost_user_backend = { path = "../vhost_user_backend" }
|
||||
vhost_rs = { git = "https://github.com/cloud-hypervisor/vhost", branch = "dragonball", package = "vhost", features = ["vhost-user-slave"] }
|
||||
virtio-bindings = "0.1.0"
|
||||
virtio-devices = { path = "../virtio-devices" }
|
||||
vm-memory = "0.2.1"
|
||||
vmm-sys-util = ">=0.3.1"
|
||||
|
||||
@@ -8,11 +8,12 @@
|
||||
//
|
||||
// SPDX-License-Identifier: (Apache-2.0 AND BSD-3-Clause)
|
||||
|
||||
extern crate block_util;
|
||||
extern crate log;
|
||||
extern crate vhost_rs;
|
||||
extern crate vhost_user_backend;
|
||||
extern crate virtio_devices;
|
||||
|
||||
use block_util::{build_disk_image_id, Request, VirtioBlockConfig};
|
||||
use libc::EFD_NONBLOCK;
|
||||
use log::*;
|
||||
use option_parser::{OptionParser, OptionParserError, Toggle};
|
||||
@@ -37,8 +38,6 @@ use vhost_rs::vhost_user::Listener;
|
||||
use vhost_user_backend::{VhostUserBackend, VhostUserDaemon, Vring};
|
||||
use virtio_bindings::bindings::virtio_blk::*;
|
||||
use virtio_bindings::bindings::virtio_ring::VIRTIO_RING_F_EVENT_IDX;
|
||||
use virtio_devices::block::{build_disk_image_id, Request};
|
||||
use virtio_devices::VirtioBlockConfig;
|
||||
use vm_memory::ByteValued;
|
||||
use vm_memory::{Bytes, GuestMemoryMmap};
|
||||
use vmm_sys_util::eventfd::EventFd;
|
||||
|
||||
Reference in New Issue
Block a user