summaryrefslogtreecommitdiffstats
path: root/include/linux/blkdev.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2006-08-10 09:01:02 +0200
committerJens Axboe <axboe@nelson.home.kernel.dk>2006-09-30 20:29:42 +0200
commit5404bc7a87b9949cf61e0174b21f80e73239ab25 (patch)
tree230c799aef2dcad8c64da55114508d28d2b30183 /include/linux/blkdev.h
parentda20a20f3b5c175648fa797c899dd577e4dacb51 (diff)
downloadkernel-crypto-5404bc7a87b9949cf61e0174b21f80e73239ab25.tar.gz
kernel-crypto-5404bc7a87b9949cf61e0174b21f80e73239ab25.tar.xz
kernel-crypto-5404bc7a87b9949cf61e0174b21f80e73239ab25.zip
[PATCH] Allow file systems to differentiate between data and meta reads
We can use this information for making more intelligent priority decisions, and it will also be useful for blktrace. Signed-off-by: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r--include/linux/blkdev.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 5d8e288db16..2c01a90998a 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -180,6 +180,7 @@ enum rq_flag_bits {
__REQ_ORDERED_COLOR, /* is before or after barrier */
__REQ_RW_SYNC, /* request is sync (O_DIRECT) */
__REQ_ALLOCED, /* request came from our alloc pool */
+ __REQ_RW_META, /* metadata io request */
__REQ_NR_BITS, /* stops here */
};
@@ -200,6 +201,7 @@ enum rq_flag_bits {
#define REQ_ORDERED_COLOR (1 << __REQ_ORDERED_COLOR)
#define REQ_RW_SYNC (1 << __REQ_RW_SYNC)
#define REQ_ALLOCED (1 << __REQ_ALLOCED)
+#define REQ_RW_META (1 << __REQ_RW_META)
#define BLK_MAX_CDB 16
@@ -543,6 +545,7 @@ enum {
* We regard a request as sync, if it's a READ or a SYNC write.
*/
#define rq_is_sync(rq) (rq_data_dir((rq)) == READ || (rq)->cmd_flags & REQ_RW_SYNC)
+#define rq_is_meta(rq) ((rq)->cmd_flags & REQ_RW_META)
static inline int blk_queue_full(struct request_queue *q, int rw)
{