summaryrefslogtreecommitdiff
path: root/drivers/scsi/device_handler/scsi_dh_alua.c
diff options
context:
space:
mode:
authorDavid Jeffery <djeffery@redhat.com>2022-04-27 21:32:50 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2022-04-28 05:40:09 +0300
commit8be70a842f70c0fe8e00fd488b1966344fa10ff4 (patch)
tree6556e5cbfa4572a8849649aee72b80a66a77e3df /drivers/scsi/device_handler/scsi_dh_alua.c
parentfaad6cebded8e0fd902b672f220449b93db479eb (diff)
downloadlinux-8be70a842f70c0fe8e00fd488b1966344fa10ff4.tar.xz
scsi: target: pscsi: Set SCF_TREAT_READ_AS_NORMAL flag only if there is valid data
With tape devices, the SCF_TREAT_READ_AS_NORMAL flag is used by the target subsystem to mark commands which have both data to return as well as sense data. But with pscsi, SCF_TREAT_READ_AS_NORMAL can be set even if there is no data to return. The SCF_TREAT_READ_AS_NORMAL flag causes the target core to call iscsit data-in callbacks even if there is no data, which iscsit does not support. This results in iscsit going into an error state requiring recovery and being unable to complete the command to the initiator. This issue can be resolved by fixing pscsi to only set SCF_TREAT_READ_AS_NORMAL if there is valid data to return alongside the sense data. Link: https://lore.kernel.org/r/20220427183250.291881-1-djeffery@redhat.com Fixes: bd81372065fa ("scsi: target: transport should handle st FM/EOM/ILI reads") Reported-by: Scott Hamilton <scott.hamilton@atos.net> Tested-by: Laurence Oberman <loberman@redhat.com> Reviewed-by: Laurence Oberman <loberman@redhat.com> Signed-off-by: David Jeffery <djeffery@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/device_handler/scsi_dh_alua.c')
0 files changed, 0 insertions, 0 deletions