]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.25/patches.fixes/scsi-retry-TASK_ABORTED
Updated xen patches taken from suse.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.fixes / scsi-retry-TASK_ABORTED
1 Subject: scsi_error: TASK ABORTED status handling improvement
2 From: Vladislav Bolkhovitin <vst@vlnb.net>
3 Date: Fri Nov 7 11:21:03 2008 -0600:
4 Git: ab2d67aa39bc63a60fba748b27cf4d962d0dc7f8
5
6 This patch improves handling of TASK ABORTED status by Linux SCSI
7 mid-layer. Currently, command returned with this status considered
8 failed and returned to upper layers. It leads to additional error
9 recovery load on file systems and block layer, which sometimes can
10 cause undesired side effects, like I/O errors and file systems
11 corruptions. See http://lkml.org/lkml/2008/11/1/38, for instance.
12
13 From other side, TASK ABORTED status is returned by SCSI target if the
14 corresponding command was aborted by another initiator and the target
15 has TAS bit set in the control mode page. So, in the majority of cases
16 commands with TASK ABORTED status should be simply retried. In other
17 cases, maybe_retry path will not retry if no retries are allowed.
18
19 This patch implement suggestion by James Bottomley from
20 http://marc.info/?l=linux-scsi&m=121932916906009&w=2.
21
22 Signed-off-by: Vladislav Bolkhovitin <vst@vlnb.net>
23 Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
24 Signed-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)