blkcg: remove static policy ID enums
authorTejun Heo <tj@kernel.org>
Fri, 13 Apr 2012 20:11:28 +0000 (13:11 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 20 Apr 2012 08:06:06 +0000 (10:06 +0200)
commit8bd435b30ecacb69bbb8b2d3e251f770b807c5b2
treea1a50e95517a54a578af3967fb4016a5a1a42a68
parentec399347d39fb2337ebace928cf4a2855bd0ec37
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>
block/blk-cgroup.c
block/blk-cgroup.h
block/blk-throttle.c
block/cfq-iosched.c
include/linux/blkdev.h