]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: virtio-scsi: Correctly handle the case where all LUNs are unplugged
authorMaxim Levitsky <mlevitsk@redhat.com>
Wed, 29 Jul 2020 19:48:06 +0000 (22:48 +0300)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 31 Jul 2020 01:08:52 +0000 (21:08 -0400)
commit1dbb995899b4fcdb729a35a81972697d26f534ca
treebcaa415abc9a25d21fabc9b3d40d129fcfe3da10
parent60dc0b3603b7f656eb53b4ecb450475849b0eb63
scsi: virtio-scsi: Correctly handle the case where all LUNs are unplugged

Commit 6fa90f6076e2 ("scsi: virtio_scsi: unplug LUNs when events missed")
missed a corner case in which all the LUNs are unplugged at the same time.

In this case INQUIRY returns DID_BAD_TARGET. Detect this and unplug the
LUN.

Link: https://lore.kernel.org/r/20200729194806.4933-2-mlevitsk@redhat.com
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/virtio_scsi.c