virtio-devices: vhost_user: classify disconnected backend errors

Add two explicit disconnected-backend error paths before wiring them
into the call sites.

MigratableError::DeviceDisconnected is the lifecycle sentinel for
operations that were skipped because a component is already known to be
disconnected. It lets the caller log and continue without treating it as
a VMM-fatal condition.

Error::BackendDisconnected is the vhost-user-local error used when
VhostUserCommon refuses to call a backend after its disconnected flag is
set. The transport classifier treats socket close/reset/EOF and
vhost-user partial-message/disconnected cases as transport loss, while
backend NACKs, invalid protocol state, and retry-able socket errors
remain ordinary operation failures.

Signed-off-by: Dylan Reid <dgreid@fb.com>
This commit is contained in:
Dylan Reid
2026-05-08 17:26:46 -07:00
committed by Bo Chen
parent 45fdc276fe
commit 4f60379142
2 changed files with 73 additions and 1 deletions

View File

@@ -92,6 +92,9 @@ pub enum MigratableError {
#[error("Failed to release a disk lock")]
UnlockError(#[source] anyhow::Error),
#[error("Lifecycle operation skipped for disconnected component {0}")]
DeviceDisconnected(String),
}
/// A Pausable component can be paused and resumed.