aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTejun Heo2011-12-13 17:33:37 -0600
committerJens Axboe2011-12-13 17:33:37 -0600
commita73f730d013ff2788389fd0c46ad3e5510f124e6 (patch)
tree773987c8cbec56745d46f46382ad268ed91adf98 /block/blk-sysfs.c
parent8ba61435d73f2274e12d4d823fde06735e8f6a54 (diff)
downloadkernel-common-a73f730d013ff2788389fd0c46ad3e5510f124e6.tar.gz
kernel-common-a73f730d013ff2788389fd0c46ad3e5510f124e6.tar.xz
kernel-common-a73f730d013ff2788389fd0c46ad3e5510f124e6.zip
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-sysfs.c')
-rw-r--r--block/blk-sysfs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index f0b2ca8f66d..5b4b4ab5e78 100644
--- a/block/blk-sysfs.c
+++ b/block/blk-sysfs.c
@@ -494,6 +494,8 @@ static void blk_release_queue(struct kobject *kobj)
494 blk_trace_shutdown(q); 494 blk_trace_shutdown(q);
495 495
496 bdi_destroy(&q->backing_dev_info); 496 bdi_destroy(&q->backing_dev_info);
497
498 ida_simple_remove(&blk_queue_ida, q->id);
497 kmem_cache_free(blk_requestq_cachep, q); 499 kmem_cache_free(blk_requestq_cachep, q);
498} 500}
499 501