aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_error.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2010-08-07 12:17:56 -0400
committerJens Axboe <jaxboe@fusionio.com>2010-08-07 12:17:56 -0400
commit33659ebbae262228eef4e0fe990f393d1f0ed941 (patch)
treefcb537f09359c8dad3a6f6e16dc4319562dc42cc /drivers/scsi/scsi_error.c
parent7e005f79791dcd58436c88ded4a7f5aed1b82147 (diff)
block: remove wrappers for request type/flags
Remove all the trivial wrappers for the cmd_type and cmd_flags fields in struct requests. This allows much easier grepping for different request types instead of unwinding through macros. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'drivers/scsi/scsi_error.c')
-rw-r--r--drivers/scsi/scsi_error.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index a5d630f5f519..1b88af89d0c7 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -307,7 +307,7 @@ static int scsi_check_sense(struct scsi_cmnd *scmd)
307 (sshdr.asc == 0x04) && (sshdr.ascq == 0x02)) 307 (sshdr.asc == 0x04) && (sshdr.ascq == 0x02))
308 return FAILED; 308 return FAILED;
309 309
310 if (blk_barrier_rq(scmd->request)) 310 if (scmd->request->cmd_flags & REQ_HARDBARRIER)
311 /* 311 /*
312 * barrier requests should always retry on UA 312 * barrier requests should always retry on UA
313 * otherwise block will get a spurious error 313 * otherwise block will get a spurious error
@@ -1318,16 +1318,16 @@ int scsi_noretry_cmd(struct scsi_cmnd *scmd)
1318 case DID_OK: 1318 case DID_OK:
1319 break; 1319 break;
1320 case DID_BUS_BUSY: 1320 case DID_BUS_BUSY:
1321 return blk_failfast_transport(scmd->request); 1321 return (scmd->request->cmd_flags & REQ_FAILFAST_TRANSPORT);
1322 case DID_PARITY: 1322 case DID_PARITY:
1323 return blk_failfast_dev(scmd->request); 1323 return (scmd->request->cmd_flags & REQ_FAILFAST_DEV);
1324 case DID_ERROR: 1324 case DID_ERROR:
1325 if (msg_byte(scmd->result) == COMMAND_COMPLETE && 1325 if (msg_byte(scmd->result) == COMMAND_COMPLETE &&
1326 status_byte(scmd->result) == RESERVATION_CONFLICT) 1326 status_byte(scmd->result) == RESERVATION_CONFLICT)
1327 return 0; 1327 return 0;
1328 /* fall through */ 1328 /* fall through */
1329 case DID_SOFT_ERROR: 1329 case DID_SOFT_ERROR:
1330 return blk_failfast_driver(scmd->request); 1330 return (scmd->request->cmd_flags & REQ_FAILFAST_DRIVER);
1331 } 1331 }
1332 1332
1333 switch (status_byte(scmd->result)) { 1333 switch (status_byte(scmd->result)) {
@@ -1336,7 +1336,7 @@ int scsi_noretry_cmd(struct scsi_cmnd *scmd)
1336 * assume caller has checked sense and determinted 1336 * assume caller has checked sense and determinted
1337 * the check condition was retryable. 1337 * the check condition was retryable.
1338 */ 1338 */
1339 return blk_failfast_dev(scmd->request); 1339 return (scmd->request->cmd_flags & REQ_FAILFAST_DEV);
1340 } 1340 }
1341 1341
1342 return 0; 1342 return 0;