linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] virtio-scsi: fix missing unplug events when all LUNs are unplugged at the same time
@ 2020-07-29 19:48 Maxim Levitsky
  2020-07-29 19:48 ` [PATCH 1/1] scsi: virtio-scsi: handle correctly case when all LUNs were unplugged Maxim Levitsky
  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
  0 siblings, 2 replies; 4+ messages in thread
From: Maxim Levitsky @ 2020-07-29 19:48 UTC (permalink / raw)
  To: linux-kernel
  Cc: Paolo Bonzini, open list:SCSI SUBSYSTEM,
	open list:VIRTIO BLOCK AND SCSI DRIVERS, Stefan Hajnoczi,
	Michael S. Tsirkin, Martin K. Petersen, James E.J. Bottomley,
	Jason Wang, Maxim Levitsky

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



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-07-30  2:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-29 19:48 [PATCH 0/1] virtio-scsi: fix missing unplug events when all LUNs are unplugged at the same time Maxim Levitsky
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

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).