public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Maxim Levitsky <mlevitsk@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	linux-scsi@vger.kernel.org (open list:SCSI SUBSYSTEM),
	virtualization@lists.linux-foundation.org (open list:VIRTIO
	BLOCK AND SCSI DRIVERS), Stefan Hajnoczi <stefanha@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	Jason Wang <jasowang@redhat.com>,
	Maxim Levitsky <mlevitsk@redhat.com>
Subject: [PATCH 0/1] virtio-scsi: fix missing unplug events when all LUNs are unplugged at the same time
Date: Wed, 29 Jul 2020 22:48:05 +0300	[thread overview]
Message-ID: <20200729194806.4933-1-mlevitsk@redhat.com> (raw)

virtio-scsi currently has limit of 8 outstanding notifications so when more that
8 LUNs are unplugged, some are missed.

Commit 5ff843721467 ("scsi: virtio_scsi: unplug LUNs when events missed")
Fixed this by checking the 'event overflow' bit and manually scanned the bus
to see which LUNs are still there.

However there is a corner case when all LUNs are unplugged.
In this case (which is not fully scsi confirmant IMHO), all scsi
commands to such device respond with INVALID TARGET.

This patch proposes to detect this and remove the LUN in this case
as well.

Maxim Levitsky (1):
  scsi: virtio-scsi: handle correctly case when all LUNs were unplugged

 drivers/scsi/virtio_scsi.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

-- 
2.26.2



             reply	other threads:[~2020-07-29 19:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-29 19:48 Maxim Levitsky [this message]
2020-07-29 19:48 ` [PATCH 1/1] scsi: virtio-scsi: handle correctly case when all LUNs were unplugged Maxim Levitsky
2020-07-29 22:10   ` Paolo Bonzini
2020-07-30  2:24 ` [PATCH 0/1] virtio-scsi: fix missing unplug events when all LUNs are unplugged at the same time Martin K. Petersen

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=20200729194806.4933-1-mlevitsk@redhat.com \
    --to=mlevitsk@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    /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