[SCSI] Do not retry a request whose data integrity check failed
If initiator or target reject the I/O due to DIF errors there is no point in retrying. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
This commit is contained in:
Родитель
7027ad72a6
Коммит
511e44f42e
|
@ -344,6 +344,9 @@ static int scsi_check_sense(struct scsi_cmnd *scmd)
|
|||
return /* soft_error */ SUCCESS;
|
||||
|
||||
case ABORTED_COMMAND:
|
||||
if (sshdr.asc == 0x10) /* DIF */
|
||||
return SUCCESS;
|
||||
|
||||
return NEEDS_RETRY;
|
||||
case NOT_READY:
|
||||
case UNIT_ATTENTION:
|
||||
|
|
|
@ -950,10 +950,15 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes)
|
|||
* 6-byte command.
|
||||
*/
|
||||
scsi_requeue_command(q, cmd);
|
||||
return;
|
||||
} else {
|
||||
} else if (sshdr.asc == 0x10) /* DIX */
|
||||
scsi_end_request(cmd, -EIO, this_count, 0);
|
||||
else
|
||||
scsi_end_request(cmd, -EIO, this_count, 1);
|
||||
return;
|
||||
case ABORTED_COMMAND:
|
||||
if (sshdr.asc == 0x10) { /* DIF */
|
||||
scsi_end_request(cmd, -EIO, this_count, 0);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case NOT_READY:
|
||||
|
|
Загрузка…
Ссылка в новой задаче