mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
virtio-devices: vhost_user: skip resume for disconnected backends
resume() mirrors pause() for backend communication: it skips the vhost-user backend call when the device is already disconnected, and it marks newly failed resume_vhost_user() calls disconnected only when the classifier identifies transport loss. Signed-off-by: Dylan Reid <dgreid@fb.com>
This commit is contained in:
@@ -5553,7 +5553,13 @@ impl Pausable for DeviceManager {
|
||||
fn resume(&mut self) -> result::Result<(), MigratableError> {
|
||||
for (_, device_node) in self.device_tree.lock().unwrap().iter() {
|
||||
if let Some(migratable) = &device_node.migratable {
|
||||
migratable.lock().unwrap().resume()?;
|
||||
match migratable.lock().unwrap().resume() {
|
||||
Ok(()) => {}
|
||||
Err(MigratableError::DeviceDisconnected(id)) => {
|
||||
warn!("Skipping resume for disconnected device {id}");
|
||||
}
|
||||
Err(e) => return Err(e),
|
||||
}
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user