aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTejun Heo2012-03-05 15:15:18 -0600
committerJens Axboe2012-03-06 14:27:23 -0600
commit4eef3049986e8397d5003916aed8cad6567a5e02 (patch)
tree5e36431986907b9fa728a6fbeb819a2738a64c82 /include/linux/blkdev.h
parentc1768268f9424410761da57ea71107acae7b03cc (diff)
downloadkernel-common-4eef3049986e8397d5003916aed8cad6567a5e02.tar.gz
kernel-common-4eef3049986e8397d5003916aed8cad6567a5e02.tar.xz
kernel-common-4eef3049986e8397d5003916aed8cad6567a5e02.zip
blkcg: move per-queue blkg list heads and counters to queue and blkg
Currently, specific policy implementations are responsible for maintaining list and number of blkgs. This duplicates code unnecessarily, and hinders factoring common code and providing blkcg API with better defined semantics. After this patch, request_queue hosts list heads and counters and blkg has list nodes for both policies. This patch only relocates the necessary fields and the next patch will actually move management code into blkcg core. Note that request_queue->blkg_list[] and ->nr_blkgs[] are hardcoded to have 2 elements. This is to avoid include dependency and will be removed by the next patch. This patch doesn't introduce any behavior change. -v2: Now unnecessary conditional on CONFIG_BLK_CGROUP_MODULE removed as pointed out by Vivek. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/blkdev.h')
-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 e8c0bbd06b9..f4e35edea70 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -362,6 +362,11 @@ struct request_queue {
362 struct list_head timeout_list; 362 struct list_head timeout_list;
363 363
364 struct list_head icq_list; 364 struct list_head icq_list;
365#ifdef CONFIG_BLK_CGROUP
366 /* XXX: array size hardcoded to avoid include dependency (temporary) */
367 struct list_head blkg_list[2];
368 int nr_blkgs[2];
369#endif
365 370
366 struct queue_limits limits; 371 struct queue_limits limits;
367 372