mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
virtio-devices: vhost_user: skip pause for disconnected backends
pause() returns DeviceDisconnected without calling into the backend when VhostUserCommon already knows the socket is gone. DeviceManager treats only that sentinel as log-and-continue, so one dead vhost-user device does not abort the whole pause iteration. Signed-off-by: Dylan Reid <dgreid@fb.com>
This commit is contained in:
@@ -5526,7 +5526,13 @@ impl Pausable for DeviceManager {
|
||||
fn pause(&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().pause()?;
|
||||
match migratable.lock().unwrap().pause() {
|
||||
Ok(()) => {}
|
||||
Err(MigratableError::DeviceDisconnected(id)) => {
|
||||
warn!("Skipping pause for disconnected device {id}");
|
||||
}
|
||||
Err(e) => return Err(e),
|
||||
}
|
||||
}
|
||||
}
|
||||
// On AArch64, the pause of device manager needs to trigger
|
||||
|
||||
Reference in New Issue
Block a user