]> git.baikalelectronics.ru Git - kernel.git/commit
[SCSI] Add timeout to avoid infinite command retry
authorEiichi Tsukata <eiichi.tsukata.xh@hitachi.com>
Tue, 11 Feb 2014 05:29:52 +0000 (14:29 +0900)
committerJames Bottomley <JBottomley@Parallels.com>
Sat, 15 Mar 2014 17:19:19 +0000 (10:19 -0700)
commit02958ee762a255db17d38717158013317096c1d5
tree6303d3553a35c5f42351f8042d9fd0dda4e6b71a
parentef70417232624dcc7ca7d003ed064a14c783c24c
[SCSI] Add timeout to avoid infinite command retry

Currently, scsi error handling in scsi_io_completion() tries to
unconditionally requeue scsi command when device keeps some error state.
For example, UNIT_ATTENTION causes infinite retry with
action == ACTION_RETRY.
This is because retryable errors are thought to be temporary and the scsi
device will soon recover from those errors. Normally, such retry policy is
appropriate because the device will soon recover from temporary error state.

But there is no guarantee that device is able to recover from error state
immediately. Some hardware error can prevent device from recovering.

This patch adds timeout in scsi_io_completion() to avoid infinite command
retry in scsi_io_completion(). Once scsi command retry time is longer than
this timeout, the command is treated as failure.

Signed-off-by: Eiichi Tsukata <eiichi.tsukata.xh@hitachi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/scsi_lib.c