aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2007-07-16 02:52:14 -0400
committerJens Axboe <jens.axboe@oracle.com>2007-07-16 02:52:46 -0400
commitabae1fde63fcdd2a3abaa0d7930938d8326f83d2 (patch)
tree4b61cd4e13b511229193549162607894badab984 /include
parentefba1a31f3f8fe9672eb96cd26e97fb96891f1c0 (diff)
add a struct request pointer to the request structure
This adds a struct request pointer to the request structure for the second data phase (bidi for now). A request queue supporting bidi requests sets QUEUE_FLAG_BIDI. This prevents sending bidi requests to a non-bidi queue. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/blkdev.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 24b474e05a44..b32564a1e105 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -317,6 +317,9 @@ struct request {
317 */ 317 */
318 rq_end_io_fn *end_io; 318 rq_end_io_fn *end_io;
319 void *end_io_data; 319 void *end_io_data;
320
321 /* for bidi */
322 struct request *next_rq;
320}; 323};
321 324
322/* 325/*
@@ -486,6 +489,7 @@ struct request_queue
486#define QUEUE_FLAG_REENTER 6 /* Re-entrancy avoidance */ 489#define QUEUE_FLAG_REENTER 6 /* Re-entrancy avoidance */
487#define QUEUE_FLAG_PLUGGED 7 /* queue is plugged */ 490#define QUEUE_FLAG_PLUGGED 7 /* queue is plugged */
488#define QUEUE_FLAG_ELVSWITCH 8 /* don't use elevator, just do FIFO */ 491#define QUEUE_FLAG_ELVSWITCH 8 /* don't use elevator, just do FIFO */
492#define QUEUE_FLAG_BIDI 9 /* queue supports bidi requests */
489 493
490enum { 494enum {
491 /* 495 /*
@@ -550,6 +554,7 @@ enum {
550#define blk_sorted_rq(rq) ((rq)->cmd_flags & REQ_SORTED) 554#define blk_sorted_rq(rq) ((rq)->cmd_flags & REQ_SORTED)
551#define blk_barrier_rq(rq) ((rq)->cmd_flags & REQ_HARDBARRIER) 555#define blk_barrier_rq(rq) ((rq)->cmd_flags & REQ_HARDBARRIER)
552#define blk_fua_rq(rq) ((rq)->cmd_flags & REQ_FUA) 556#define blk_fua_rq(rq) ((rq)->cmd_flags & REQ_FUA)
557#define blk_bidi_rq(rq) ((rq)->next_rq != NULL)
553 558
554#define list_entry_rq(ptr) list_entry((ptr), struct request, queuelist) 559#define list_entry_rq(ptr) list_entry((ptr), struct request, queuelist)
555 560