scsi: libfc: spurious I/O error under high load
authorHannes Reinecke <hare@suse.de>
Thu, 13 Oct 2016 13:10:38 +0000 (15:10 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 8 Nov 2016 22:29:51 +0000 (17:29 -0500)
commita0452bb45c6bcf523acff635325fee7dd961c6bd
tree6a9f0ecec97b6956aaabe23251f42a382c456911
parent57d3ec7e468bb6659d9a461294d8747906fb7231
scsi: libfc: spurious I/O error under high load

If a command times out libfc is sending an REC, which also
might fail (due to frames being lost or something).
If no data has been transferred we can simply retry
the command, but the current code sets a state of FC_ERROR,
which then is being translated into DID_ERROR, resulting
in an I/O error.
So to handle this properly we need to set a separate
state FC_TRANS_RESET and mapping it onto DID_SOFT_RETRY.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Acked-by: Johannes Thumshirn <jth@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/libfc/fc_fcp.c