diff --git a/vhost_user_block/src/lib.rs b/vhost_user_block/src/lib.rs index fcb8f8b83..d507bf099 100644 --- a/vhost_user_block/src/lib.rs +++ b/vhost_user_block/src/lib.rs @@ -32,7 +32,7 @@ use std::time::Instant; use std::vec::Vec; use std::{convert, error, fmt, io}; use vhost_rs::vhost_user::message::*; -use vhost_user_backend::{VhostUserBackend, VhostUserDaemon, Vring, VringWorker}; +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 vm_memory::{Bytes, GuestMemoryError, GuestMemoryMmap}; @@ -98,7 +98,6 @@ impl convert::From for io::Error { pub struct VhostUserBlkThread { mem: Option, - vring_worker: Option>, disk_image: Box, disk_image_id: Vec, disk_nsectors: u64, @@ -147,7 +146,6 @@ impl VhostUserBlkThread { Ok(VhostUserBlkThread { mem: None, - vring_worker: None, disk_image: image, disk_image_id: image_id, disk_nsectors: nsectors, @@ -215,10 +213,6 @@ impl VhostUserBlkThread { used_any } - - pub fn set_vring_worker(&mut self, vring_worker: Option>) { - self.vring_worker = vring_worker; - } } pub struct VhostUserBlkBackend { @@ -450,15 +444,6 @@ pub fn start_block_backend(backend_command: &str) { .unwrap(); debug!("blk_daemon is created!\n"); - let vring_worker = blk_daemon.get_vring_workers(); - blk_backend - .write() - .unwrap() - .thread - .lock() - .unwrap() - .set_vring_worker(Some(vring_worker[0].clone())); - if let Err(e) = blk_daemon.start() { error!( "Failed to start daemon for vhost-user-block with error: {:?}\n",