aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/blkdev.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-07-03 04:48:16 -0400
committerJens Axboe <jens.axboe@oracle.com>2009-09-11 08:33:27 -0400
commita82afdfcb8c0df09776b6458af6b68fc58b2e87b (patch)
treed53910e4c2e9d1502cf2a7ce67a67cc54decb7fa /include/linux/blkdev.h
parent0d03d59d9b31cd1e33b7e46a80b6fef66244b1f2 (diff)
block: use the same failfast bits for bio and request
bio and request use the same set of failfast bits. This patch makes the following changes to simplify things. * enumify BIO_RW* bits and reorder bits such that BIOS_RW_FAILFAST_* bits coincide with __REQ_FAILFAST_* bits. * The above pushes BIO_RW_AHEAD out of sync with __REQ_FAILFAST_DEV but the matching is useless anyway. init_request_from_bio() is responsible for setting FAILFAST bits on FS requests and non-FS requests never use BIO_RW_AHEAD. Drop the code and comment from blk_rq_bio_prep(). * Define REQ_FAILFAST_MASK which is OR of all FAILFAST bits and simplify FAILFAST flags handling in init_request_from_bio(). Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r--include/linux/blkdev.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 69103e053c92..c3015736d814 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -93,6 +93,7 @@ enum rq_flag_bits {
93 __REQ_FAILFAST_DEV, /* no driver retries of device errors */ 93 __REQ_FAILFAST_DEV, /* no driver retries of device errors */
94 __REQ_FAILFAST_TRANSPORT, /* no driver retries of transport errors */ 94 __REQ_FAILFAST_TRANSPORT, /* no driver retries of transport errors */
95 __REQ_FAILFAST_DRIVER, /* no driver retries of driver errors */ 95 __REQ_FAILFAST_DRIVER, /* no driver retries of driver errors */
96 /* above flags must match BIO_RW_* */
96 __REQ_DISCARD, /* request to discard sectors */ 97 __REQ_DISCARD, /* request to discard sectors */
97 __REQ_SORTED, /* elevator knows about this request */ 98 __REQ_SORTED, /* elevator knows about this request */
98 __REQ_SOFTBARRIER, /* may not be passed by ioscheduler */ 99 __REQ_SOFTBARRIER, /* may not be passed by ioscheduler */
@@ -143,6 +144,9 @@ enum rq_flag_bits {
143#define REQ_NOIDLE (1 << __REQ_NOIDLE) 144#define REQ_NOIDLE (1 << __REQ_NOIDLE)
144#define REQ_IO_STAT (1 << __REQ_IO_STAT) 145#define REQ_IO_STAT (1 << __REQ_IO_STAT)
145 146
147#define REQ_FAILFAST_MASK (REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | \
148 REQ_FAILFAST_DRIVER)
149
146#define BLK_MAX_CDB 16 150#define BLK_MAX_CDB 16
147 151
148/* 152/*