]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: virtio_scsi: unplug LUNs when events missed
authorMatt Lupfer <mlupfer@ddn.com>
Thu, 5 Sep 2019 18:19:28 +0000 (18:19 +0000)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 11 Sep 2019 02:10:17 +0000 (22:10 -0400)
commit7c32960ea5021ee7112c9804fcd271f7aa1592e2
tree58731689c7f5c9e2a7a33ea67864bc2a9b105316
parent3a762fa14d756a7602db41b9a0e1b9213e5f818b
scsi: virtio_scsi: unplug LUNs when events missed

The event handler calls scsi_scan_host() when events are missed, which will
hotplug new LUNs.  However, this function won't remove any unplugged LUNs.
The result is that hotunplug doesn't work properly when the number of
unplugged LUNs exceeds the event queue size (currently 8).

Scan existing LUNs when events are missed to check if they are still
present.  If not, remove them.

Link: https://lore.kernel.org/r/20190905181903.29756-1-mlupfer@ddn.com
Signed-off-by: Matt Lupfer <mlupfer@ddn.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/virtio_scsi.c