diff options
author | Mike Christie <michael.christie@oracle.com> | 2022-08-11 20:00:22 -0500 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-09-06 22:05:58 -0400 |
commit | 377a7b0b1e5fd157547904874c84331b32df1109 (patch) | |
tree | 78c7ceb09d7e38eaf7729a2b4a0ac0b4aeb4e36b /drivers/scsi/53c700.h | |
parent | beb4dac8d23546c14c77fce724a214348523d503 (diff) |
scsi: virtio_scsi: Drop DID_NEXUS_FAILURE use
DID_NEXUS_FAILURE is internal to the SCSI layer. Drivers must not use it
because:
1. It's not propagated upwards, so SG IO/passthrough users will not see an
error and think a command was successful.
2. There is no handling for it in scsi_decide_disposition() so it results
in entering SCSI error handling.
virtio_scsi gets this when something like qemu returns
VIRTIO_SCSI_S_NEXUS_FAILURE. It looks like qemu returns that error code if
host OS returns DID_NEXUS_FAILURE (qemu's internal
SCSI_HOST_RESERVATION_ERROR maps to DID_NEXUS_FAILURE). This shouldn't
happen for Linux since we don't propagate that error code to userspace.
This has us convert VIRTIO_SCSI_S_NEXUS_FAILURE to a
SAM_STAT_RESERVATION_CONFLICT in case some other virt layer is returning
it. In that case we will still get the reservation confict failure we
expect.
Link: https://lore.kernel.org/r/20220812010027.8251-6-michael.christie@oracle.com
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/53c700.h')
0 files changed, 0 insertions, 0 deletions