diff options
-rw-r--r-- | block/blk-core.c | 11 | ||||
-rw-r--r-- | drivers/md/dm-mpath.c | 2 | ||||
-rw-r--r-- | drivers/md/multipath.c | 4 | ||||
-rw-r--r-- | drivers/s390/block/dasd_diag.c | 2 | ||||
-rw-r--r-- | drivers/s390/block/dasd_eckd.c | 2 | ||||
-rw-r--r-- | drivers/s390/block/dasd_fba.c | 2 | ||||
-rw-r--r-- | drivers/scsi/device_handler/scsi_dh_alua.c | 3 | ||||
-rw-r--r-- | drivers/scsi/device_handler/scsi_dh_emc.c | 3 | ||||
-rw-r--r-- | drivers/scsi/device_handler/scsi_dh_hp_sw.c | 6 | ||||
-rw-r--r-- | drivers/scsi/device_handler/scsi_dh_rdac.c | 3 | ||||
-rw-r--r-- | drivers/scsi/scsi_transport_spi.c | 4 | ||||
-rw-r--r-- | include/linux/bio.h | 26 | ||||
-rw-r--r-- | include/linux/blkdev.h | 15 |
13 files changed, 57 insertions, 26 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index 2d053b584410..9e79a485e4f3 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
@@ -1075,8 +1075,15 @@ void init_request_from_bio(struct request *req, struct bio *bio) | |||
1075 | /* | 1075 | /* |
1076 | * inherit FAILFAST from bio (for read-ahead, and explicit FAILFAST) | 1076 | * inherit FAILFAST from bio (for read-ahead, and explicit FAILFAST) |
1077 | */ | 1077 | */ |
1078 | if (bio_rw_ahead(bio) || bio_failfast(bio)) | 1078 | if (bio_rw_ahead(bio)) |
1079 | req->cmd_flags |= REQ_FAILFAST; | 1079 | req->cmd_flags |= (REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | |
1080 | REQ_FAILFAST_DRIVER); | ||
1081 | if (bio_failfast_dev(bio)) | ||
1082 | req->cmd_flags |= REQ_FAILFAST_DEV; | ||
1083 | if (bio_failfast_transport(bio)) | ||
1084 | req->cmd_flags |= REQ_FAILFAST_TRANSPORT; | ||
1085 | if (bio_failfast_driver(bio)) | ||
1086 | req->cmd_flags |= REQ_FAILFAST_DRIVER; | ||
1080 | 1087 | ||
1081 | /* | 1088 | /* |
1082 | * REQ_BARRIER implies no merging, but lets make it explicit | 1089 | * REQ_BARRIER implies no merging, but lets make it explicit |
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index 103304c1e3b0..9bf3460c5540 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c | |||
@@ -849,7 +849,7 @@ static int multipath_map(struct dm_target *ti, struct bio *bio, | |||
849 | dm_bio_record(&mpio->details, bio); | 849 | dm_bio_record(&mpio->details, bio); |
850 | 850 | ||
851 | map_context->ptr = mpio; | 851 | map_context->ptr = mpio; |
852 | bio->bi_rw |= (1 << BIO_RW_FAILFAST); | 852 | bio->bi_rw |= (1 << BIO_RW_FAILFAST_TRANSPORT); |
853 | r = map_io(m, bio, mpio, 0); | 853 | r = map_io(m, bio, mpio, 0); |
854 | if (r < 0 || r == DM_MAPIO_REQUEUE) | 854 | if (r < 0 || r == DM_MAPIO_REQUEUE) |
855 | mempool_free(mpio, m->mpio_pool); | 855 | mempool_free(mpio, m->mpio_pool); |
diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c index 8bb8794129b3..7ae33ebaf7ec 100644 --- a/drivers/md/multipath.c +++ b/drivers/md/multipath.c | |||
@@ -176,7 +176,7 @@ static int multipath_make_request (struct request_queue *q, struct bio * bio) | |||
176 | mp_bh->bio = *bio; | 176 | mp_bh->bio = *bio; |
177 | mp_bh->bio.bi_sector += multipath->rdev->data_offset; | 177 | mp_bh->bio.bi_sector += multipath->rdev->data_offset; |
178 | mp_bh->bio.bi_bdev = multipath->rdev->bdev; | 178 | mp_bh->bio.bi_bdev = multipath->rdev->bdev; |
179 | mp_bh->bio.bi_rw |= (1 << BIO_RW_FAILFAST); | 179 | mp_bh->bio.bi_rw |= (1 << BIO_RW_FAILFAST_TRANSPORT); |
180 | mp_bh->bio.bi_end_io = multipath_end_request; | 180 | mp_bh->bio.bi_end_io = multipath_end_request; |
181 | mp_bh->bio.bi_private = mp_bh; | 181 | mp_bh->bio.bi_private = mp_bh; |
182 | generic_make_request(&mp_bh->bio); | 182 | generic_make_request(&mp_bh->bio); |
@@ -402,7 +402,7 @@ static void multipathd (mddev_t *mddev) | |||
402 | *bio = *(mp_bh->master_bio); | 402 | *bio = *(mp_bh->master_bio); |
403 | bio->bi_sector += conf->multipaths[mp_bh->path].rdev->data_offset; | 403 | bio->bi_sector += conf->multipaths[mp_bh->path].rdev->data_offset; |
404 | bio->bi_bdev = conf->multipaths[mp_bh->path].rdev->bdev; | 404 | bio->bi_bdev = conf->multipaths[mp_bh->path].rdev->bdev; |
405 | bio->bi_rw |= (1 << BIO_RW_FAILFAST); | 405 | bio->bi_rw |= (1 << BIO_RW_FAILFAST_TRANSPORT); |
406 | bio->bi_end_io = multipath_end_request; | 406 | bio->bi_end_io = multipath_end_request; |
407 | bio->bi_private = mp_bh; | 407 | bio->bi_private = mp_bh; |
408 | generic_make_request(bio); | 408 | generic_make_request(bio); |
diff --git a/drivers/s390/block/dasd_diag.c b/drivers/s390/block/dasd_diag.c index 85fcb4371054..7844461a995b 100644 --- a/drivers/s390/block/dasd_diag.c +++ b/drivers/s390/block/dasd_diag.c | |||
@@ -544,7 +544,7 @@ static struct dasd_ccw_req *dasd_diag_build_cp(struct dasd_device *memdev, | |||
544 | } | 544 | } |
545 | cqr->retries = DIAG_MAX_RETRIES; | 545 | cqr->retries = DIAG_MAX_RETRIES; |
546 | cqr->buildclk = get_clock(); | 546 | cqr->buildclk = get_clock(); |
547 | if (req->cmd_flags & REQ_FAILFAST) | 547 | if (blk_noretry_request(req)) |
548 | set_bit(DASD_CQR_FLAGS_FAILFAST, &cqr->flags); | 548 | set_bit(DASD_CQR_FLAGS_FAILFAST, &cqr->flags); |
549 | cqr->startdev = memdev; | 549 | cqr->startdev = memdev; |
550 | cqr->memdev = memdev; | 550 | cqr->memdev = memdev; |
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c index 49f9d221e23d..2e60d5f968c8 100644 --- a/drivers/s390/block/dasd_eckd.c +++ b/drivers/s390/block/dasd_eckd.c | |||
@@ -1700,7 +1700,7 @@ static struct dasd_ccw_req *dasd_eckd_build_cp(struct dasd_device *startdev, | |||
1700 | recid++; | 1700 | recid++; |
1701 | } | 1701 | } |
1702 | } | 1702 | } |
1703 | if (req->cmd_flags & REQ_FAILFAST) | 1703 | if (blk_noretry_request(req)) |
1704 | set_bit(DASD_CQR_FLAGS_FAILFAST, &cqr->flags); | 1704 | set_bit(DASD_CQR_FLAGS_FAILFAST, &cqr->flags); |
1705 | cqr->startdev = startdev; | 1705 | cqr->startdev = startdev; |
1706 | cqr->memdev = startdev; | 1706 | cqr->memdev = startdev; |
diff --git a/drivers/s390/block/dasd_fba.c b/drivers/s390/block/dasd_fba.c index 93d9b6452a94..7d442aeff3d1 100644 --- a/drivers/s390/block/dasd_fba.c +++ b/drivers/s390/block/dasd_fba.c | |||
@@ -355,7 +355,7 @@ static struct dasd_ccw_req *dasd_fba_build_cp(struct dasd_device * memdev, | |||
355 | recid++; | 355 | recid++; |
356 | } | 356 | } |
357 | } | 357 | } |
358 | if (req->cmd_flags & REQ_FAILFAST) | 358 | if (blk_noretry_request(req)) |
359 | set_bit(DASD_CQR_FLAGS_FAILFAST, &cqr->flags); | 359 | set_bit(DASD_CQR_FLAGS_FAILFAST, &cqr->flags); |
360 | cqr->startdev = memdev; | 360 | cqr->startdev = memdev; |
361 | cqr->memdev = memdev; | 361 | cqr->memdev = memdev; |
diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c index 708e475896b9..cb8aa3b58c22 100644 --- a/drivers/scsi/device_handler/scsi_dh_alua.c +++ b/drivers/scsi/device_handler/scsi_dh_alua.c | |||
@@ -109,7 +109,8 @@ static struct request *get_alua_req(struct scsi_device *sdev, | |||
109 | } | 109 | } |
110 | 110 | ||
111 | rq->cmd_type = REQ_TYPE_BLOCK_PC; | 111 | rq->cmd_type = REQ_TYPE_BLOCK_PC; |
112 | rq->cmd_flags |= REQ_FAILFAST | REQ_NOMERGE; | 112 | rq->cmd_flags |= REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | |
113 | REQ_FAILFAST_DRIVER | REQ_NOMERGE; | ||
113 | rq->retries = ALUA_FAILOVER_RETRIES; | 114 | rq->retries = ALUA_FAILOVER_RETRIES; |
114 | rq->timeout = ALUA_FAILOVER_TIMEOUT; | 115 | rq->timeout = ALUA_FAILOVER_TIMEOUT; |
115 | 116 | ||
diff --git a/drivers/scsi/device_handler/scsi_dh_emc.c b/drivers/scsi/device_handler/scsi_dh_emc.c index 8f45570a8a01..0e572d2c5b0a 100644 --- a/drivers/scsi/device_handler/scsi_dh_emc.c +++ b/drivers/scsi/device_handler/scsi_dh_emc.c | |||
@@ -303,7 +303,8 @@ static struct request *get_req(struct scsi_device *sdev, int cmd, | |||
303 | 303 | ||
304 | rq->cmd[4] = len; | 304 | rq->cmd[4] = len; |
305 | rq->cmd_type = REQ_TYPE_BLOCK_PC; | 305 | rq->cmd_type = REQ_TYPE_BLOCK_PC; |
306 | rq->cmd_flags |= REQ_FAILFAST; | 306 | rq->cmd_flags |= REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | |
307 | REQ_FAILFAST_DRIVER; | ||
307 | rq->timeout = CLARIION_TIMEOUT; | 308 | rq->timeout = CLARIION_TIMEOUT; |
308 | rq->retries = CLARIION_RETRIES; | 309 | rq->retries = CLARIION_RETRIES; |
309 | 310 | ||
diff --git a/drivers/scsi/device_handler/scsi_dh_hp_sw.c b/drivers/scsi/device_handler/scsi_dh_hp_sw.c index 5e93c88ad66b..9aec4ca64e56 100644 --- a/drivers/scsi/device_handler/scsi_dh_hp_sw.c +++ b/drivers/scsi/device_handler/scsi_dh_hp_sw.c | |||
@@ -112,7 +112,8 @@ static int hp_sw_tur(struct scsi_device *sdev, struct hp_sw_dh_data *h) | |||
112 | return SCSI_DH_RES_TEMP_UNAVAIL; | 112 | return SCSI_DH_RES_TEMP_UNAVAIL; |
113 | 113 | ||
114 | req->cmd_type = REQ_TYPE_BLOCK_PC; | 114 | req->cmd_type = REQ_TYPE_BLOCK_PC; |
115 | req->cmd_flags |= REQ_FAILFAST; | 115 | req->cmd_flags |= REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | |
116 | REQ_FAILFAST_DRIVER; | ||
116 | req->cmd_len = COMMAND_SIZE(TEST_UNIT_READY); | 117 | req->cmd_len = COMMAND_SIZE(TEST_UNIT_READY); |
117 | req->cmd[0] = TEST_UNIT_READY; | 118 | req->cmd[0] = TEST_UNIT_READY; |
118 | req->timeout = HP_SW_TIMEOUT; | 119 | req->timeout = HP_SW_TIMEOUT; |
@@ -204,7 +205,8 @@ static int hp_sw_start_stop(struct scsi_device *sdev, struct hp_sw_dh_data *h) | |||
204 | return SCSI_DH_RES_TEMP_UNAVAIL; | 205 | return SCSI_DH_RES_TEMP_UNAVAIL; |
205 | 206 | ||
206 | req->cmd_type = REQ_TYPE_BLOCK_PC; | 207 | req->cmd_type = REQ_TYPE_BLOCK_PC; |
207 | req->cmd_flags |= REQ_FAILFAST; | 208 | req->cmd_flags |= REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | |
209 | REQ_FAILFAST_DRIVER; | ||
208 | req->cmd_len = COMMAND_SIZE(START_STOP); | 210 | req->cmd_len = COMMAND_SIZE(START_STOP); |
209 | req->cmd[0] = START_STOP; | 211 | req->cmd[0] = START_STOP; |
210 | req->cmd[4] = 1; /* Start spin cycle */ | 212 | req->cmd[4] = 1; /* Start spin cycle */ |
diff --git a/drivers/scsi/device_handler/scsi_dh_rdac.c b/drivers/scsi/device_handler/scsi_dh_rdac.c index 50bf95f3b5c4..a43c3ed4df28 100644 --- a/drivers/scsi/device_handler/scsi_dh_rdac.c +++ b/drivers/scsi/device_handler/scsi_dh_rdac.c | |||
@@ -226,7 +226,8 @@ static struct request *get_rdac_req(struct scsi_device *sdev, | |||
226 | } | 226 | } |
227 | 227 | ||
228 | rq->cmd_type = REQ_TYPE_BLOCK_PC; | 228 | rq->cmd_type = REQ_TYPE_BLOCK_PC; |
229 | rq->cmd_flags |= REQ_FAILFAST | REQ_NOMERGE; | 229 | rq->cmd_flags |= REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | |
230 | REQ_FAILFAST_DRIVER; | ||
230 | rq->retries = RDAC_RETRIES; | 231 | rq->retries = RDAC_RETRIES; |
231 | rq->timeout = RDAC_TIMEOUT; | 232 | rq->timeout = RDAC_TIMEOUT; |
232 | 233 | ||
diff --git a/drivers/scsi/scsi_transport_spi.c b/drivers/scsi/scsi_transport_spi.c index b29360ed0bdc..7c2d28924d2a 100644 --- a/drivers/scsi/scsi_transport_spi.c +++ b/drivers/scsi/scsi_transport_spi.c | |||
@@ -109,7 +109,9 @@ static int spi_execute(struct scsi_device *sdev, const void *cmd, | |||
109 | for(i = 0; i < DV_RETRIES; i++) { | 109 | for(i = 0; i < DV_RETRIES; i++) { |
110 | result = scsi_execute(sdev, cmd, dir, buffer, bufflen, | 110 | result = scsi_execute(sdev, cmd, dir, buffer, bufflen, |
111 | sense, DV_TIMEOUT, /* retries */ 1, | 111 | sense, DV_TIMEOUT, /* retries */ 1, |
112 | REQ_FAILFAST); | 112 | REQ_FAILFAST_DEV | |
113 | REQ_FAILFAST_TRANSPORT | | ||
114 | REQ_FAILFAST_DRIVER); | ||
113 | if (result & DRIVER_SENSE) { | 115 | if (result & DRIVER_SENSE) { |
114 | struct scsi_sense_hdr sshdr_tmp; | 116 | struct scsi_sense_hdr sshdr_tmp; |
115 | if (!sshdr) | 117 | if (!sshdr) |
diff --git a/include/linux/bio.h b/include/linux/bio.h index ff5b4cf9e2da..1beda208cbfb 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -129,25 +129,30 @@ struct bio { | |||
129 | * bit 2 -- barrier | 129 | * bit 2 -- barrier |
130 | * Insert a serialization point in the IO queue, forcing previously | 130 | * Insert a serialization point in the IO queue, forcing previously |
131 | * submitted IO to be completed before this oen is issued. | 131 | * submitted IO to be completed before this oen is issued. |
132 | * bit 3 -- fail fast, don't want low level driver retries | 132 | * bit 3 -- synchronous I/O hint: the block layer will unplug immediately |
133 | * bit 4 -- synchronous I/O hint: the block layer will unplug immediately | ||
134 | * Note that this does NOT indicate that the IO itself is sync, just | 133 | * Note that this does NOT indicate that the IO itself is sync, just |
135 | * that the block layer will not postpone issue of this IO by plugging. | 134 | * that the block layer will not postpone issue of this IO by plugging. |
136 | * bit 5 -- metadata request | 135 | * bit 4 -- metadata request |
137 | * Used for tracing to differentiate metadata and data IO. May also | 136 | * Used for tracing to differentiate metadata and data IO. May also |
138 | * get some preferential treatment in the IO scheduler | 137 | * get some preferential treatment in the IO scheduler |
139 | * bit 6 -- discard sectors | 138 | * bit 5 -- discard sectors |
140 | * Informs the lower level device that this range of sectors is no longer | 139 | * Informs the lower level device that this range of sectors is no longer |
141 | * used by the file system and may thus be freed by the device. Used | 140 | * used by the file system and may thus be freed by the device. Used |
142 | * for flash based storage. | 141 | * for flash based storage. |
142 | * bit 6 -- fail fast device errors | ||
143 | * bit 7 -- fail fast transport errors | ||
144 | * bit 8 -- fail fast driver errors | ||
145 | * Don't want driver retries for any fast fail whatever the reason. | ||
143 | */ | 146 | */ |
144 | #define BIO_RW 0 /* Must match RW in req flags (blkdev.h) */ | 147 | #define BIO_RW 0 /* Must match RW in req flags (blkdev.h) */ |
145 | #define BIO_RW_AHEAD 1 /* Must match FAILFAST in req flags */ | 148 | #define BIO_RW_AHEAD 1 /* Must match FAILFAST in req flags */ |
146 | #define BIO_RW_BARRIER 2 | 149 | #define BIO_RW_BARRIER 2 |
147 | #define BIO_RW_FAILFAST 3 | 150 | #define BIO_RW_SYNC 3 |
148 | #define BIO_RW_SYNC 4 | 151 | #define BIO_RW_META 4 |
149 | #define BIO_RW_META 5 | 152 | #define BIO_RW_DISCARD 5 |
150 | #define BIO_RW_DISCARD 6 | 153 | #define BIO_RW_FAILFAST_DEV 6 |
154 | #define BIO_RW_FAILFAST_TRANSPORT 7 | ||
155 | #define BIO_RW_FAILFAST_DRIVER 8 | ||
151 | 156 | ||
152 | /* | 157 | /* |
153 | * upper 16 bits of bi_rw define the io priority of this bio | 158 | * upper 16 bits of bi_rw define the io priority of this bio |
@@ -174,7 +179,10 @@ struct bio { | |||
174 | #define bio_sectors(bio) ((bio)->bi_size >> 9) | 179 | #define bio_sectors(bio) ((bio)->bi_size >> 9) |
175 | #define bio_barrier(bio) ((bio)->bi_rw & (1 << BIO_RW_BARRIER)) | 180 | #define bio_barrier(bio) ((bio)->bi_rw & (1 << BIO_RW_BARRIER)) |
176 | #define bio_sync(bio) ((bio)->bi_rw & (1 << BIO_RW_SYNC)) | 181 | #define bio_sync(bio) ((bio)->bi_rw & (1 << BIO_RW_SYNC)) |
177 | #define bio_failfast(bio) ((bio)->bi_rw & (1 << BIO_RW_FAILFAST)) | 182 | #define bio_failfast_dev(bio) ((bio)->bi_rw & (1 << BIO_RW_FAILFAST_DEV)) |
183 | #define bio_failfast_transport(bio) \ | ||
184 | ((bio)->bi_rw & (1 << BIO_RW_FAILFAST_TRANSPORT)) | ||
185 | #define bio_failfast_driver(bio) ((bio)->bi_rw & (1 << BIO_RW_FAILFAST_DRIVER)) | ||
178 | #define bio_rw_ahead(bio) ((bio)->bi_rw & (1 << BIO_RW_AHEAD)) | 186 | #define bio_rw_ahead(bio) ((bio)->bi_rw & (1 << BIO_RW_AHEAD)) |
179 | #define bio_rw_meta(bio) ((bio)->bi_rw & (1 << BIO_RW_META)) | 187 | #define bio_rw_meta(bio) ((bio)->bi_rw & (1 << BIO_RW_META)) |
180 | #define bio_discard(bio) ((bio)->bi_rw & (1 << BIO_RW_DISCARD)) | 188 | #define bio_discard(bio) ((bio)->bi_rw & (1 << BIO_RW_DISCARD)) |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index a92d9e4ea96e..f3491d225268 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -87,7 +87,9 @@ enum { | |||
87 | */ | 87 | */ |
88 | enum rq_flag_bits { | 88 | enum rq_flag_bits { |
89 | __REQ_RW, /* not set, read. set, write */ | 89 | __REQ_RW, /* not set, read. set, write */ |
90 | __REQ_FAILFAST, /* no low level driver retries */ | 90 | __REQ_FAILFAST_DEV, /* no driver retries of device errors */ |
91 | __REQ_FAILFAST_TRANSPORT, /* no driver retries of transport errors */ | ||
92 | __REQ_FAILFAST_DRIVER, /* no driver retries of driver errors */ | ||
91 | __REQ_DISCARD, /* request to discard sectors */ | 93 | __REQ_DISCARD, /* request to discard sectors */ |
92 | __REQ_SORTED, /* elevator knows about this request */ | 94 | __REQ_SORTED, /* elevator knows about this request */ |
93 | __REQ_SOFTBARRIER, /* may not be passed by ioscheduler */ | 95 | __REQ_SOFTBARRIER, /* may not be passed by ioscheduler */ |
@@ -111,8 +113,10 @@ enum rq_flag_bits { | |||
111 | }; | 113 | }; |
112 | 114 | ||
113 | #define REQ_RW (1 << __REQ_RW) | 115 | #define REQ_RW (1 << __REQ_RW) |
116 | #define REQ_FAILFAST_DEV (1 << __REQ_FAILFAST_DEV) | ||
117 | #define REQ_FAILFAST_TRANSPORT (1 << __REQ_FAILFAST_TRANSPORT) | ||
118 | #define REQ_FAILFAST_DRIVER (1 << __REQ_FAILFAST_DRIVER) | ||
114 | #define REQ_DISCARD (1 << __REQ_DISCARD) | 119 | #define REQ_DISCARD (1 << __REQ_DISCARD) |
115 | #define REQ_FAILFAST (1 << __REQ_FAILFAST) | ||
116 | #define REQ_SORTED (1 << __REQ_SORTED) | 120 | #define REQ_SORTED (1 << __REQ_SORTED) |
117 | #define REQ_SOFTBARRIER (1 << __REQ_SOFTBARRIER) | 121 | #define REQ_SOFTBARRIER (1 << __REQ_SOFTBARRIER) |
118 | #define REQ_HARDBARRIER (1 << __REQ_HARDBARRIER) | 122 | #define REQ_HARDBARRIER (1 << __REQ_HARDBARRIER) |
@@ -560,7 +564,12 @@ enum { | |||
560 | #define blk_special_request(rq) ((rq)->cmd_type == REQ_TYPE_SPECIAL) | 564 | #define blk_special_request(rq) ((rq)->cmd_type == REQ_TYPE_SPECIAL) |
561 | #define blk_sense_request(rq) ((rq)->cmd_type == REQ_TYPE_SENSE) | 565 | #define blk_sense_request(rq) ((rq)->cmd_type == REQ_TYPE_SENSE) |
562 | 566 | ||
563 | #define blk_noretry_request(rq) ((rq)->cmd_flags & REQ_FAILFAST) | 567 | #define blk_failfast_dev(rq) ((rq)->cmd_flags & REQ_FAILFAST_DEV) |
568 | #define blk_failfast_transport(rq) ((rq)->cmd_flags & REQ_FAILFAST_TRANSPORT) | ||
569 | #define blk_failfast_driver(rq) ((rq)->cmd_flags & REQ_FAILFAST_DRIVER) | ||
570 | #define blk_noretry_request(rq) (blk_failfast_dev(rq) || \ | ||
571 | blk_failfast_transport(rq) || \ | ||
572 | blk_failfast_driver(rq)) | ||
564 | #define blk_rq_started(rq) ((rq)->cmd_flags & REQ_STARTED) | 573 | #define blk_rq_started(rq) ((rq)->cmd_flags & REQ_STARTED) |
565 | 574 | ||
566 | #define blk_account_rq(rq) (blk_rq_started(rq) && (blk_fs_request(rq) || blk_discard_rq(rq))) | 575 | #define blk_account_rq(rq) (blk_rq_started(rq) && (blk_fs_request(rq) || blk_discard_rq(rq))) |