diff options
author | Hannes Reinecke <hare@suse.de> | 2013-10-23 04:51:22 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-10-25 07:18:30 -0400 |
commit | 6fd046f960354250de3fed411eecdb784601bbad (patch) | |
tree | f51263ca495b7ce8d4f318cef6baad434c93c55f /drivers/scsi/scsi_error.c | |
parent | b45620229dd67ff1daffa8adce57f37b37860f78 (diff) |
[SCSI] scsi_error: Escalate to LUN reset if abort fails
If a command abort fails there is a fair chance that all other
aborts will be failing, too.
So we should be calling LUN reset directly after the first failed
abort and skip aborting the remaining commands.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/scsi_error.c')
-rw-r--r-- | drivers/scsi/scsi_error.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index edae9e20f886..e8bee9f0ad0f 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c | |||
@@ -1192,18 +1192,20 @@ static int scsi_eh_abort_cmds(struct list_head *work_q, | |||
1192 | "0x%p\n", current->comm, | 1192 | "0x%p\n", current->comm, |
1193 | scmd)); | 1193 | scmd)); |
1194 | rtn = scsi_try_to_abort_cmd(shost->hostt, scmd); | 1194 | rtn = scsi_try_to_abort_cmd(shost->hostt, scmd); |
1195 | if (rtn == SUCCESS || rtn == FAST_IO_FAIL) { | 1195 | if (rtn == FAILED) { |
1196 | scmd->eh_eflags &= ~SCSI_EH_CANCEL_CMD; | ||
1197 | if (rtn == FAST_IO_FAIL) | ||
1198 | scsi_eh_finish_cmd(scmd, done_q); | ||
1199 | else | ||
1200 | list_move_tail(&scmd->eh_entry, &check_list); | ||
1201 | } else | ||
1202 | SCSI_LOG_ERROR_RECOVERY(3, printk("%s: aborting" | 1196 | SCSI_LOG_ERROR_RECOVERY(3, printk("%s: aborting" |
1203 | " cmd failed:" | 1197 | " cmd failed:" |
1204 | "0x%p\n", | 1198 | "0x%p\n", |
1205 | current->comm, | 1199 | current->comm, |
1206 | scmd)); | 1200 | scmd)); |
1201 | list_splice_init(&check_list, work_q); | ||
1202 | return list_empty(work_q); | ||
1203 | } | ||
1204 | scmd->eh_eflags &= ~SCSI_EH_CANCEL_CMD; | ||
1205 | if (rtn == FAST_IO_FAIL) | ||
1206 | scsi_eh_finish_cmd(scmd, done_q); | ||
1207 | else | ||
1208 | list_move_tail(&scmd->eh_entry, &check_list); | ||
1207 | } | 1209 | } |
1208 | 1210 | ||
1209 | return scsi_eh_test_devices(&check_list, work_q, done_q, 0); | 1211 | return scsi_eh_test_devices(&check_list, work_q, done_q, 0); |