Skip to content

virtio-scsi: fix missing unplug events when all LUNs are unplugged at the same time

Maxim Levitsky linux-scsi lkml 1 version Applied

Status from this message: Applied to 5.9/scsi-queue, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 2 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/1scsi: virtio-scsi: handle correctly case when all LUNs were unpluggeddrivers/scsi/virtio_scsi.c+10 -01 reply

Reviews trailers per patch

The patch has a Reviewed-by or Acked-by.

PatchPaolo Bonzini
1/1A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/1] virtio-scsi: fix missing unplug events when all LUNs are unplugged at the same time

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(+)
Signature · 1 line
2.26.2