summaryrefslogtreecommitdiff
path: root/include/linux/blkdev.h
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-05-20 10:54:31 +0400
committerJens Axboe <jens.axboe@oracle.com>2009-05-20 10:54:31 +0400
commit0a7ae2ff0d29bb3b327edff4c8ab67b3834fa811 (patch)
tree88309ac99a39e15b9b23525a00a15b1564957b32 /include/linux/blkdev.h
parentac36552a52a6ec8563ac0a109e2a0935673f4abb (diff)
downloadlinux-0a7ae2ff0d29bb3b327edff4c8ab67b3834fa811.tar.xz
block: change the tag sync vs async restriction logic
Make them fully share the tag space, but disallow async requests using the last any two slots. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r--include/linux/blkdev.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 564445be7a6d..a967dd775dbd 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -404,7 +404,7 @@ struct request_queue
struct list_head tag_busy_list;
unsigned int nr_sorted;
- unsigned int in_flight;
+ unsigned int in_flight[2];
unsigned int rq_timeout;
struct timer_list timeout;
@@ -511,6 +511,11 @@ static inline void queue_flag_clear_unlocked(unsigned int flag,
__clear_bit(flag, &q->queue_flags);
}
+static inline int queue_in_flight(struct request_queue *q)
+{
+ return q->in_flight[0] + q->in_flight[1];
+}
+
static inline void queue_flag_clear(unsigned int flag, struct request_queue *q)
{
WARN_ON_ONCE(!queue_is_locked(q));