On 7/12/23 15:43, Stefano Garzarella wrote:
Commit 1880ad4f4e ("virtio-scsi: Batched prepare for cmd reqs") split
calls to scsi_req_new() and scsi_req_enqueue() in the virtio-scsi device.
This had no drawback, until commit 8cc5583abe ("virtio-scsi: Send

More precisely, it was pretty hard to trigger it; it might be possible using a CD-ROM, as it can report a MEDIUM_CHANGED unit attention. I will change "This had no drawback" to "No ill effect was reported"

"REPORTED LUNS CHANGED" sense data upon disk hotplug events") added a
bus unit attention.

... that was fairly easy to trigger via SCSI device hotplug/hot-unplug.

Queued the series, thanks for the tests and for applying the cleanups on top.

Co-developed-by: Paolo Bonzini <pbonz...@redhat.com>

Heh, I basically only wrote the "if (req->init_req)" statement so that's pretty generous, but I'll keep it anyway. :)

Paolo

Having the two calls separated, all requests in the batch were prepared
calling scsi_req_new() to report a sense.
Then only the first one submitted calling scsi_req_enqueue() reported the
right sense and reset it to NO_SENSE.
The others reported NO_SENSE, causing SCSI errors in Linux.


Reply via email to