virtio-devices: block: don't kill worker on per-request errors

The guest can cause submit and completion failures with malformed chains
or invalid addresses. However, this shouldn't permanently stall the
device and terminate the worker.

Genuine reset-worthy failures set needs_reset and return `Ok` anyways
and will more cleanly reset the worker.

Signed-off-by: Dylan Reid <dgreid@fb.com>
This commit is contained in:
Dylan Reid
2026-04-24 17:07:11 -07:00
committed by Rob Bradford
parent fbcf2fd6b0
commit c565d4eb88

View File

@@ -417,9 +417,10 @@ Setting device status to 'NEEDS_RESET' and stopping processing queues until rese
}
fn process_queue_submit_and_signal(&mut self) -> result::Result<(), EpollHelperError> {
self.process_queue_submit().map_err(|e| {
EpollHelperError::HandleEvent(anyhow!("Failed to process queue (submit): {e:?}"))
})?;
// Per-request errors are logged but non-device fatal.
if let Err(e) = self.process_queue_submit() {
warn!("Failed to process queue (submit): {e:?}");
}
self.try_signal_used_queue()
}
@@ -672,11 +673,9 @@ impl EpollHelperHandler for BlockEpollHandler {
EpollHelperError::HandleEvent(anyhow!("Failed to get queue event: {e:?}"))
})?;
self.process_queue_complete().map_err(|e| {
EpollHelperError::HandleEvent(anyhow!(
"Failed to process queue (complete): {e:?}"
))
})?;
if let Err(e) = self.process_queue_complete() {
warn!("Failed to process queue (complete): {e:?}");
}
self.try_signal_used_queue()?;