diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-09 18:35:53 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-09 18:35:53 -0700 |
commit | 93cb463141d50e4c6a574efc2c6e4d6d76ffed77 (patch) | |
tree | 3d15e3ba65a28bc2df08f388acaa02f1f4f09cce /drivers/scsi/scsi_error.c | |
parent | 1c6fe0364fa7bf28248488753ee0afb6b759cd04 (diff) | |
parent | 77a4229719e511a0d38d9c355317ae1469adeb54 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
[SCSI] Retry commands with UNIT_ATTENTION sense codes to fix ext3/ext4 I/O error
[SCSI] Enable retries for SYNCRONIZE_CACHE commands to fix I/O error
[SCSI] scsi_debug: virtual_gb ignores sector_size
[SCSI] libiscsi: regression: fix header digest errors
[SCSI] fix locking around blk_abort_request()
[SCSI] advansys: fix narrow board error path
Diffstat (limited to 'drivers/scsi/scsi_error.c')
-rw-r--r-- | drivers/scsi/scsi_error.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index d45c69ca5737..7ad53fa42766 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -302,7 +302,20 @@ static int scsi_check_sense(struct scsi_cmnd *scmd) if (scmd->device->allow_restart && (sshdr.asc == 0x04) && (sshdr.ascq == 0x02)) return FAILED; - return SUCCESS; + + if (blk_barrier_rq(scmd->request)) + /* + * barrier requests should always retry on UA + * otherwise block will get a spurious error + */ + return NEEDS_RETRY; + else + /* + * for normal (non barrier) commands, pass the + * UA upwards for a determination in the + * completion functions + */ + return SUCCESS; /* these three are not supported */ case COPY_ABORTED: |