]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blame - src/patches/suse-2.6.27.31/patches.fixes/scsi-retry-TASK_ABORTED
Move xen patchset to new version's subdir.
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.fixes / scsi-retry-TASK_ABORTED
CommitLineData
00e5a55c
BS
1Subject: scsi_error: TASK ABORTED status handling improvement
2From: Vladislav Bolkhovitin <vst@vlnb.net>
3Date: Fri Nov 7 11:21:03 2008 -0600:
4Git: ab2d67aa39bc63a60fba748b27cf4d962d0dc7f8
5
6This patch improves handling of TASK ABORTED status by Linux SCSI
7mid-layer. Currently, command returned with this status considered
8failed and returned to upper layers. It leads to additional error
9recovery load on file systems and block layer, which sometimes can
10cause undesired side effects, like I/O errors and file systems
11corruptions. See http://lkml.org/lkml/2008/11/1/38, for instance.
12
13From other side, TASK ABORTED status is returned by SCSI target if the
14corresponding command was aborted by another initiator and the target
15has TAS bit set in the control mode page. So, in the majority of cases
16commands with TASK ABORTED status should be simply retried. In other
17cases, maybe_retry path will not retry if no retries are allowed.
18
19This patch implement suggestion by James Bottomley from
20http://marc.info/?l=linux-scsi&m=121932916906009&w=2.
21
22Signed-off-by: Vladislav Bolkhovitin <vst@vlnb.net>
23Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
24Signed-off-by: Hannes Reinecke <hare@suse.de>
25
26---
27 drivers/scsi/scsi_error.c | 3 ++-
28 1 file changed, 2 insertions(+), 1 deletion(-)
29
30--- a/drivers/scsi/scsi_error.c
31+++ b/drivers/scsi/scsi_error.c
32@@ -1486,8 +1486,9 @@ int scsi_decide_disposition(struct scsi_
33 return ADD_TO_MLQUEUE;
34 case GOOD:
35 case COMMAND_TERMINATED:
36- case TASK_ABORTED:
37 return SUCCESS;
38+ case TASK_ABORTED:
39+ goto maybe_retry;
40 case CHECK_CONDITION:
41 rtn = scsi_check_sense(scmd);
42 if (rtn == NEEDS_RETRY)