]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: virtio_scsi: Rescan the entire target on transport reset when LUN is 0
authorMatej Genci <matej.genci@nutanix.com>
Fri, 28 Aug 2020 12:21:35 +0000 (12:21 +0000)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 16 Sep 2020 01:51:52 +0000 (21:51 -0400)
commitd7d9b498f552a372ea0f9249f856e025bed437ae
treea196e47f2b98ca7b0112d38a9169b5854988f5f6
parent5a23803224a32e1080f82a93a8933d4fcca2a488
scsi: virtio_scsi: Rescan the entire target on transport reset when LUN is 0

VirtIO 1.0 spec says:

    The removed and rescan events ... when sent for LUN 0, they MAY
    apply to the entire target so the driver can ask the initiator
    to rescan the target to detect this.

This change introduces the behaviour described above by scanning the entire
SCSI target when LUN is set to 0. This is both a functional and a
performance fix. It aligns the driver with the spec and allows control
planes to hotplug targets with large numbers of LUNs without having to
request a RESCAN for each one of them.

Link: https://lore.kernel.org/r/CY4PR02MB33354370E0A81E75DD9DFE74FB520@CY4PR02MB3335.namprd02.prod.outlook.com
Suggested-by: Felipe Franciosi <felipe@nutanix.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Matej Genci <matej.genci@nutanix.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/virtio_scsi.c