Skip to content

scsi: fix issue with Linux guest and unit attention

Stefano Garzarella qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3scsi: fetch unit attention when creating the requesthw/scsi/scsi-bus.c include/hw/scsi/scsi.h+34 -37 replies
2/3scsi: cleanup scsi_clear_unit_attention()hw/scsi/scsi-bus.c+6 -220 replies
3/3scsi: clear unit attention only for REPORT LUNS commandshw/scsi/scsi-bus.c+11 -230 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/3] scsi: fix issue with Linux guest and unit attention

This series tries to fix a problem highlighted by the commit 8cc5583abe ("virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events").

We initially thought about reverting that commit, but now we have found a pre-existing issue introduced by commit 1880ad4f4e ("virtio-scsi:
Batched prepare for cmd reqs"). More details in the discussion of the reverting tentative [1].

Thanks to Thomas for identifying the commit that highlighted the problem and providing an easy way to reproduce the issue, Stefan for his useful comments, Mike for the scsi logs, and a big thanks to Paolo for his help in preparing this series!

Stefano

[1] https://lore.kernel.org/qemu-devel/i3od362o6unuimlqna3aaedliaabauj6g545esg7txidd4s44e@bkx5des6zytx/

Stefano Garzarella (3):
scsi: fetch unit attention when creating the request
scsi: cleanup scsi_clear_unit_attention()
scsi: clear unit attention only for REPORT LUNS commands

 include/hw/scsi/scsi.h |  1 +
 hw/scsi/scsi-bus.c     | 78 ++++++++++++++++++++++--------------------
 2 files changed, 41 insertions(+), 38 deletions(-)
Signature · 1 line
2.41.0