aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/blkdev.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2012-04-13 16:11:28 -0400
committerJens Axboe <axboe@kernel.dk>2012-04-20 04:06:06 -0400
commit8bd435b30ecacb69bbb8b2d3e251f770b807c5b2 (patch)
treea1a50e95517a54a578af3967fb4016a5a1a42a68 /include/linux/blkdev.h
parentec399347d39fb2337ebace928cf4a2855bd0ec37 (diff)
blkcg: remove static policy ID enums
Remove BLKIO_POLICY_* enums and let blkio_policy_register() allocate @pol->plid dynamically on registration. The maximum number of blkcg policies which can be registered at the same time is defined by BLKCG_MAX_POLS constant added to include/linux/blkdev.h. Note that blkio_policy_register() now may fail. Policy init functions updated accordingly and unnecessary ifdefs removed from cfq_init(). 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.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 33f1b29e53f4..d2c69f8c188a 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -35,6 +35,12 @@ struct bsg_job;
35#define BLKDEV_MIN_RQ 4 35#define BLKDEV_MIN_RQ 4
36#define BLKDEV_MAX_RQ 128 /* Default maximum */ 36#define BLKDEV_MAX_RQ 128 /* Default maximum */
37 37
38/*
39 * Maximum number of blkcg policies allowed to be registered concurrently.
40 * Defined here to simplify include dependency.
41 */
42#define BLKCG_MAX_POLS 2
43
38struct request; 44struct request;
39typedef void (rq_end_io_fn)(struct request *, int); 45typedef void (rq_end_io_fn)(struct request *, int);
40 46
@@ -363,7 +369,6 @@ struct request_queue {
363 369
364 struct list_head icq_list; 370 struct list_head icq_list;
365#ifdef CONFIG_BLK_CGROUP 371#ifdef CONFIG_BLK_CGROUP
366 /* XXX: array size hardcoded to avoid include dependency (temporary) */
367 struct list_head blkg_list; 372 struct list_head blkg_list;
368#endif 373#endif
369 374