Skip to content

scsi-block: Fix error handling with r/werror=stop

Kevin Wolf qemu-devel 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 0 repliesNew
  2. v14 patches 5 repliesSuperseded

Changes in v2 from the cover letter

- Patch 4: [Paolo]
* Set error = 0 explicitly, remove useless variable initialisation
* Add comment to explain why we consider it a guest error
* Mention scsi-block specifically in the commit message

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4scsi-disk: Use positive return value for status in dma_readv/writevhw/scsi/scsi-disk.c+14 -70 replies
2/4scsi-block: Don't skip callback for sgio error status/driver_statushw/scsi/scsi-disk.c+0 -100 replies
3/4scsi-disk: Add warning comments that host_status errors take a shortcuthw/scsi/scsi-disk.c+7 -00 replies
4/4scsi-disk: Always report RESERVATION_CONFLICT to guesthw/scsi/scsi-disk.c+30 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/4] scsi-block: Fix error handling with r/werror=stop

Running validation tests in Windows 2019's Failover Cluster Manager fails in two different ways when run with rerror/werror=stop:

1. It runs into an assertion failure because the sgio-based I/O path takes shortcuts in its error handling that skip necessary cleanup

2. RESERVATION_CONFLICT is treated as a host error and stops the VM, which in some cases can't be resumed at all because nothing will make the error go away on retry. The error should always go to the guest instead, it's an invalid request from the guest.

This series fixes these problems.

v2:
- Patch 4: [Paolo]
* Set error = 0 explicitly, remove useless variable initialisation
* Add comment to explain why we consider it a guest error
* Mention scsi-block specifically in the commit message

Kevin Wolf (4):
scsi-disk: Use positive return value for status in dma_readv/writev
scsi-block: Don't skip callback for sgio error status/driver_status
scsi-disk: Add warning comments that host_status errors take a
shortcut
scsi-disk: Always report RESERVATION_CONFLICT to guest

 hw/scsi/scsi-disk.c | 73 +++++++++++++++++++++++++++++++--------------
 1 file changed, 51 insertions(+), 22 deletions(-)
Signature · 1 line
2.45.2