diff options
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r-- | include/linux/blkdev.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 044467ef7b11..465d6babc847 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -108,6 +108,7 @@ enum rq_flag_bits { | |||
108 | __REQ_RW_META, /* metadata io request */ | 108 | __REQ_RW_META, /* metadata io request */ |
109 | __REQ_COPY_USER, /* contains copies of user pages */ | 109 | __REQ_COPY_USER, /* contains copies of user pages */ |
110 | __REQ_INTEGRITY, /* integrity metadata has been remapped */ | 110 | __REQ_INTEGRITY, /* integrity metadata has been remapped */ |
111 | __REQ_UNPLUG, /* unplug queue on submission */ | ||
111 | __REQ_NR_BITS, /* stops here */ | 112 | __REQ_NR_BITS, /* stops here */ |
112 | }; | 113 | }; |
113 | 114 | ||
@@ -134,6 +135,7 @@ enum rq_flag_bits { | |||
134 | #define REQ_RW_META (1 << __REQ_RW_META) | 135 | #define REQ_RW_META (1 << __REQ_RW_META) |
135 | #define REQ_COPY_USER (1 << __REQ_COPY_USER) | 136 | #define REQ_COPY_USER (1 << __REQ_COPY_USER) |
136 | #define REQ_INTEGRITY (1 << __REQ_INTEGRITY) | 137 | #define REQ_INTEGRITY (1 << __REQ_INTEGRITY) |
138 | #define REQ_UNPLUG (1 << __REQ_UNPLUG) | ||
137 | 139 | ||
138 | #define BLK_MAX_CDB 16 | 140 | #define BLK_MAX_CDB 16 |
139 | 141 | ||
@@ -449,6 +451,11 @@ struct request_queue | |||
449 | #define QUEUE_FLAG_STACKABLE 13 /* supports request stacking */ | 451 | #define QUEUE_FLAG_STACKABLE 13 /* supports request stacking */ |
450 | #define QUEUE_FLAG_NONROT 14 /* non-rotational device (SSD) */ | 452 | #define QUEUE_FLAG_NONROT 14 /* non-rotational device (SSD) */ |
451 | #define QUEUE_FLAG_VIRT QUEUE_FLAG_NONROT /* paravirt device */ | 453 | #define QUEUE_FLAG_VIRT QUEUE_FLAG_NONROT /* paravirt device */ |
454 | #define QUEUE_FLAG_IO_STAT 15 /* do IO stats */ | ||
455 | |||
456 | #define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \ | ||
457 | (1 << QUEUE_FLAG_CLUSTER) | \ | ||
458 | (1 << QUEUE_FLAG_STACKABLE)) | ||
452 | 459 | ||
453 | static inline int queue_is_locked(struct request_queue *q) | 460 | static inline int queue_is_locked(struct request_queue *q) |
454 | { | 461 | { |
@@ -565,6 +572,7 @@ enum { | |||
565 | #define blk_queue_stopped(q) test_bit(QUEUE_FLAG_STOPPED, &(q)->queue_flags) | 572 | #define blk_queue_stopped(q) test_bit(QUEUE_FLAG_STOPPED, &(q)->queue_flags) |
566 | #define blk_queue_nomerges(q) test_bit(QUEUE_FLAG_NOMERGES, &(q)->queue_flags) | 573 | #define blk_queue_nomerges(q) test_bit(QUEUE_FLAG_NOMERGES, &(q)->queue_flags) |
567 | #define blk_queue_nonrot(q) test_bit(QUEUE_FLAG_NONROT, &(q)->queue_flags) | 574 | #define blk_queue_nonrot(q) test_bit(QUEUE_FLAG_NONROT, &(q)->queue_flags) |
575 | #define blk_queue_io_stat(q) test_bit(QUEUE_FLAG_IO_STAT, &(q)->queue_flags) | ||
568 | #define blk_queue_flushing(q) ((q)->ordseq) | 576 | #define blk_queue_flushing(q) ((q)->ordseq) |
569 | #define blk_queue_stackable(q) \ | 577 | #define blk_queue_stackable(q) \ |
570 | test_bit(QUEUE_FLAG_STACKABLE, &(q)->queue_flags) | 578 | test_bit(QUEUE_FLAG_STACKABLE, &(q)->queue_flags) |
@@ -700,6 +708,8 @@ struct req_iterator { | |||
700 | }; | 708 | }; |
701 | 709 | ||
702 | /* This should not be used directly - use rq_for_each_segment */ | 710 | /* This should not be used directly - use rq_for_each_segment */ |
711 | #define for_each_bio(_bio) \ | ||
712 | for (; _bio; _bio = _bio->bi_next) | ||
703 | #define __rq_for_each_bio(_bio, rq) \ | 713 | #define __rq_for_each_bio(_bio, rq) \ |
704 | if ((rq->bio)) \ | 714 | if ((rq->bio)) \ |
705 | for (_bio = (rq)->bio; _bio; _bio = _bio->bi_next) | 715 | for (_bio = (rq)->bio; _bio; _bio = _bio->bi_next) |