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 <anbelski@linux.microsoft.com>
This commit is contained in:
Anatol Belski
2026-03-28 14:46:01 +01:00
committed by Bo Chen
parent cbe7018f84
commit 823ab99e02

View File

@@ -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
}
};