qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Stefano Garzarella <sgarzare@redhat.com>, qemu-devel@nongnu.org
Cc: Mike Christie <michael.christie@oracle.com>,
	Stefan Hajnoczi <stefanha@gmail.com>,
	"Michael S . Tsirkin" <mst@redhat.com>,
	Thomas Huth <thuth@redhat.com>,
	Mark Kanda <mark.kanda@oracle.com>, Fam Zheng <fam@euphon.net>
Subject: Re: [PATCH 1/3] scsi: fetch unit attention when creating the request
Date: Wed, 12 Jul 2023 18:38:14 +0200	[thread overview]
Message-ID: <602625fe-f971-8843-88b6-a63dbe52befe@redhat.com> (raw)
In-Reply-To: <20230712134352.118655-2-sgarzare@redhat.com>

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 <pbonzini@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	other threads:[~2023-07-12 16:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-12 13:43 [PATCH 0/3] scsi: fix issue with Linux guest and unit attention Stefano Garzarella
2023-07-12 13:43 ` [PATCH 1/3] scsi: fetch unit attention when creating the request Stefano Garzarella
2023-07-12 16:38   ` Paolo Bonzini [this message]
2023-07-13 11:43     ` Stefano Garzarella
2024-10-09 16:02   ` Michael Galaxy
2024-10-09 16:28     ` Paolo Bonzini
2024-10-09 18:00       ` Michael Galaxy
2024-10-11 19:44         ` Michael Tokarev
2024-10-23 13:39           ` Michael Galaxy
2023-07-12 13:43 ` [PATCH 2/3] scsi: cleanup scsi_clear_unit_attention() Stefano Garzarella
2023-07-12 13:43 ` [PATCH 3/3] scsi: clear unit attention only for REPORT LUNS commands Stefano Garzarella

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=602625fe-f971-8843-88b6-a63dbe52befe@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=fam@euphon.net \
    --cc=mark.kanda@oracle.com \
    --cc=michael.christie@oracle.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sgarzare@redhat.com \
    --cc=stefanha@gmail.com \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).