From 823ab99e027a280685c398aabc29d78254b04d3c Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Sat, 28 Mar 2026 14:46:01 +0100 Subject: [PATCH] virtio-devices: block: Use error specific status in sync fallback path The sync fallback path in process_queue_submit() hardcoded VIRTIO_BLK_S_IOERR for all errors. This caused unsupported request errors to report IOERR to the guest instead of the correct VIRTIO_BLK_S_UNSUPP. Use ExecuteError::status() to return the appropriate status code for each error variant. Signed-off-by: Anatol Belski --- virtio-devices/src/block.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virtio-devices/src/block.rs b/virtio-devices/src/block.rs index a38a378d1..8f919e3e0 100644 --- a/virtio-devices/src/block.rs +++ b/virtio-devices/src/block.rs @@ -340,7 +340,7 @@ Setting device status to 'NEEDS_RESET' and stopping processing queues until rese Ok(_) => VIRTIO_BLK_S_OK, Err(e) => { warn!("Request failed: {request:x?} {e:?}"); - VIRTIO_BLK_S_IOERR + e.status() as u32 } };