aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2011-12-13 18:33:37 -0500
committerJens Axboe <axboe@kernel.dk>2011-12-13 18:33:37 -0500
commita73f730d013ff2788389fd0c46ad3e5510f124e6 (patch)
tree773987c8cbec56745d46f46382ad268ed91adf98 /block/blk.h
parent8ba61435d73f2274e12d4d823fde06735e8f6a54 (diff)
block, cfq: move cfqd->cic_index to q->id
cfq allocates per-queue id using ida and uses it to index cic radix tree from io_context. Move it to q->id and allocate on queue init and free on queue release. This simplifies cfq a bit and will allow for further improvements of io context life-cycle management. This patch doesn't introduce any functional difference. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk.h')
-rw-r--r--block/blk.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/block/blk.h b/block/blk.h
index e38691dbb329..aae4d88fc523 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -1,6 +1,8 @@
1#ifndef BLK_INTERNAL_H 1#ifndef BLK_INTERNAL_H
2#define BLK_INTERNAL_H 2#define BLK_INTERNAL_H
3 3
4#include <linux/idr.h>
5
4/* Amount of time in which a process may batch requests */ 6/* Amount of time in which a process may batch requests */
5#define BLK_BATCH_TIME (HZ/50UL) 7#define BLK_BATCH_TIME (HZ/50UL)
6 8
@@ -9,6 +11,7 @@
9 11
10extern struct kmem_cache *blk_requestq_cachep; 12extern struct kmem_cache *blk_requestq_cachep;
11extern struct kobj_type blk_queue_ktype; 13extern struct kobj_type blk_queue_ktype;
14extern struct ida blk_queue_ida;
12 15
13void init_request_from_bio(struct request *req, struct bio *bio); 16void init_request_from_bio(struct request *req, struct bio *bio);
14void blk_rq_bio_prep(struct request_queue *q, struct request *rq, 17void blk_rq_bio_prep(struct request_queue *q, struct request *rq,