]> asedeno.scripts.mit.edu Git - linux.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)
commit5ff843721467b4ef8d857b4724e3da7f515cf242
tree58731689c7f5c9e2a7a33ea67864bc2a9b105316
parent57adf5d4cfd3198aa480e7c94a101fc8c4e6109d
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