Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 208322
b: refs/heads/master
c: e96f6ab
h: refs/heads/master
v: v3
  • Loading branch information
FUJITA Tomonori authored and Jens Axboe committed Aug 7, 2010
1 parent fc08775 commit 2b61a47
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 16f2319fd67b169c0b34391d3fa0870fff129891
refs/heads/master: e96f6abe02fc3320d669985443e8c68ff8e83294
19 changes: 4 additions & 15 deletions trunk/drivers/scsi/scsi_error.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,20 +307,7 @@ static int scsi_check_sense(struct scsi_cmnd *scmd)
(sshdr.asc == 0x04) && (sshdr.ascq == 0x02))
return FAILED;

if (scmd->request->cmd_flags & REQ_HARDBARRIER)
/*
* 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;

return NEEDS_RETRY;
/* these three are not supported */
case COPY_ABORTED:
case VOLUME_OVERFLOW:
Expand Down Expand Up @@ -1336,7 +1323,9 @@ int scsi_noretry_cmd(struct scsi_cmnd *scmd)
* assume caller has checked sense and determinted
* the check condition was retryable.
*/
return (scmd->request->cmd_flags & REQ_FAILFAST_DEV);
if (scmd->request->cmd_flags & REQ_FAILFAST_DEV ||
scmd->request->cmd_type == REQ_TYPE_BLOCK_PC)
return 1;
}

return 0;
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/scsi/sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -477,8 +477,6 @@ static int scsi_setup_discard_cmnd(struct scsi_device *sdp, struct request *rq)

static int scsi_setup_flush_cmnd(struct scsi_device *sdp, struct request *rq)
{
/* for now, we use REQ_TYPE_BLOCK_PC. */
rq->cmd_type = REQ_TYPE_BLOCK_PC;
rq->timeout = SD_TIMEOUT;
rq->retries = SD_MAX_RETRIES;
rq->cmd[0] = SYNCHRONIZE_CACHE;
Expand Down

0 comments on commit 2b61a47

Please sign in to comment.