diff --git a/vhost-user-backend/src/handler.rs b/vhost-user-backend/src/handler.rs index c63bc93..393156f 100644 --- a/vhost-user-backend/src/handler.rs +++ b/vhost-user-backend/src/handler.rs @@ -12,6 +12,7 @@ use std::os::unix::io::AsRawFd; use std::sync::Arc; use std::thread; +use crate::bitmap::BitmapReplace; #[cfg(feature = "postcopy")] use userfaultfd::{Uffd, UffdBuilder}; use vhost::vhost_user::message::{ @@ -230,7 +231,7 @@ where impl VhostUserBackendReqHandlerMut for VhostUserHandler where - T::Bitmap: NewBitmap + Clone, + T::Bitmap: BitmapReplace + NewBitmap + Clone, { fn set_owner(&mut self) -> VhostUserResult<()> { if self.owned { diff --git a/vhost-user-backend/src/lib.rs b/vhost-user-backend/src/lib.rs index e4f8a86..d6cfbf9 100644 --- a/vhost-user-backend/src/lib.rs +++ b/vhost-user-backend/src/lib.rs @@ -29,6 +29,7 @@ mod handler; pub use self::handler::VhostUserHandlerError; pub mod bitmap; +use crate::bitmap::BitmapReplace; mod vring; pub use self::vring::{ @@ -97,7 +98,7 @@ pub struct VhostUserDaemon { impl VhostUserDaemon where T: VhostUserBackend + Clone + 'static, - T::Bitmap: NewBitmap + Clone + Send + Sync, + T::Bitmap: BitmapReplace + NewBitmap + Clone + Send + Sync, T::Vring: Clone + Send + Sync, { /// Create the daemon instance, providing the backend implementation of `VhostUserBackend`.