virtio-devices: remove incorrect "blk" references

This code is shared between all vhost-user devices, not just
vhost-user-blk.

Signed-off-by: Alyssa Ross <hi@alyssa.is>
This commit is contained in:
Alyssa Ross 2023-04-12 16:58:59 +00:00 committed by Bo Chen
parent 086ca9b935
commit 3f17f4657b
2 changed files with 5 additions and 5 deletions

View File

@ -86,8 +86,8 @@ pub enum ActivateError {
ThreadSpawn(std::io::Error), ThreadSpawn(std::io::Error),
#[error("Failed to setup vhost-user-fs daemon: {0}")] #[error("Failed to setup vhost-user-fs daemon: {0}")]
VhostUserFsSetup(vhost_user::Error), VhostUserFsSetup(vhost_user::Error),
#[error("Failed to setup vhost-user-blk daemon: {0}")] #[error("Failed to setup vhost-user daemon: {0}")]
VhostUserBlkSetup(vhost_user::Error), VhostUserSetup(vhost_user::Error),
#[error("Failed to create seccomp filter: {0}")] #[error("Failed to create seccomp filter: {0}")]
CreateSeccompFilter(seccompiler::Error), CreateSeccompFilter(seccompiler::Error),
#[error("Failed to create rate limiter: {0}")] #[error("Failed to create rate limiter: {0}")]

View File

@ -340,7 +340,7 @@ impl VhostUserCommon {
&slave_req_handler, &slave_req_handler,
inflight.as_mut(), inflight.as_mut(),
) )
.map_err(ActivateError::VhostUserBlkSetup)?; .map_err(ActivateError::VhostUserSetup)?;
Ok(VhostUserEpollHandler { Ok(VhostUserEpollHandler {
vu: vu.clone(), vu: vu.clone(),
@ -413,7 +413,7 @@ impl VhostUserCommon {
pub fn pause(&mut self) -> std::result::Result<(), MigratableError> { pub fn pause(&mut self) -> std::result::Result<(), MigratableError> {
if let Some(vu) = &self.vu { if let Some(vu) = &self.vu {
vu.lock().unwrap().pause_vhost_user().map_err(|e| { vu.lock().unwrap().pause_vhost_user().map_err(|e| {
MigratableError::Pause(anyhow!("Error pausing vhost-user-blk backend: {:?}", e)) MigratableError::Pause(anyhow!("Error pausing vhost-user backend: {:?}", e))
}) })
} else { } else {
Ok(()) Ok(())
@ -423,7 +423,7 @@ impl VhostUserCommon {
pub fn resume(&mut self) -> std::result::Result<(), MigratableError> { pub fn resume(&mut self) -> std::result::Result<(), MigratableError> {
if let Some(vu) = &self.vu { if let Some(vu) = &self.vu {
vu.lock().unwrap().resume_vhost_user().map_err(|e| { vu.lock().unwrap().resume_vhost_user().map_err(|e| {
MigratableError::Resume(anyhow!("Error resuming vhost-user-blk backend: {:?}", e)) MigratableError::Resume(anyhow!("Error resuming vhost-user backend: {:?}", e))
}) })
} else { } else {
Ok(()) Ok(())