diff options
author | Vladislav Bolkhovitin <vst@vlnb.net> | 2008-11-06 05:57:52 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-12-29 12:24:15 -0500 |
commit | a9b589d90e3d7748dae459031c2d912cd9e83c88 (patch) | |
tree | c350db70abf9ea68664edce12fdb9a3629aae2c4 /drivers | |
parent | c85f8cb9254e60cd25a094329c9dc9185c2140e7 (diff) |
[SCSI] scsi_error: TASK ABORTED status handling improvement
This patch improves handling of TASK ABORTED status by Linux SCSI
mid-layer. Currently, command returned with this status considered
failed and returned to upper layers. It leads to additional error
recovery load on file systems and block layer, which sometimes can
cause undesired side effects, like I/O errors and file systems
corruptions. See http://lkml.org/lkml/2008/11/1/38, for instance.
From other side, TASK ABORTED status is returned by SCSI target if the
corresponding command was aborted by another initiator and the target
has TAS bit set in the control mode page. So, in the majority of cases
commands with TASK ABORTED status should be simply retried. In other
cases, maybe_retry path will not retry if no retries are allowed.
This patch implement suggestion by James Bottomley from
http://marc.info/?l=linux-scsi&m=121932916906009&w=2.
Signed-off-by: Vladislav Bolkhovitin <vst@vlnb.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/scsi_error.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index f5767dc48d61..381838ebd460 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c | |||
@@ -1406,8 +1406,9 @@ int scsi_decide_disposition(struct scsi_cmnd *scmd) | |||
1406 | return ADD_TO_MLQUEUE; | 1406 | return ADD_TO_MLQUEUE; |
1407 | case GOOD: | 1407 | case GOOD: |
1408 | case COMMAND_TERMINATED: | 1408 | case COMMAND_TERMINATED: |
1409 | case TASK_ABORTED: | ||
1410 | return SUCCESS; | 1409 | return SUCCESS; |
1410 | case TASK_ABORTED: | ||
1411 | goto maybe_retry; | ||
1411 | case CHECK_CONDITION: | 1412 | case CHECK_CONDITION: |
1412 | rtn = scsi_check_sense(scmd); | 1413 | rtn = scsi_check_sense(scmd); |
1413 | if (rtn == NEEDS_RETRY) | 1414 | if (rtn == NEEDS_RETRY) |