diff options
author | Tejun Heo <tj@kernel.org> | 2012-04-13 16:11:28 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2012-04-20 04:06:06 -0400 |
commit | 8bd435b30ecacb69bbb8b2d3e251f770b807c5b2 (patch) | |
tree | a1a50e95517a54a578af3967fb4016a5a1a42a68 /block/blk-throttle.c | |
parent | ec399347d39fb2337ebace928cf4a2855bd0ec37 (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 'block/blk-throttle.c')
-rw-r--r-- | block/blk-throttle.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/block/blk-throttle.c b/block/blk-throttle.c index 07c17c27a628..0dc4645aa7fe 100644 --- a/block/blk-throttle.c +++ b/block/blk-throttle.c | |||
@@ -1089,7 +1089,6 @@ static struct blkio_policy_type blkio_policy_throtl = { | |||
1089 | .blkio_exit_group_fn = throtl_exit_blkio_group, | 1089 | .blkio_exit_group_fn = throtl_exit_blkio_group, |
1090 | .blkio_reset_group_stats_fn = throtl_reset_group_stats, | 1090 | .blkio_reset_group_stats_fn = throtl_reset_group_stats, |
1091 | }, | 1091 | }, |
1092 | .plid = BLKIO_POLICY_THROTL, | ||
1093 | .pdata_size = sizeof(struct throtl_grp), | 1092 | .pdata_size = sizeof(struct throtl_grp), |
1094 | .cftypes = throtl_files, | 1093 | .cftypes = throtl_files, |
1095 | }; | 1094 | }; |
@@ -1271,8 +1270,7 @@ static int __init throtl_init(void) | |||
1271 | if (!kthrotld_workqueue) | 1270 | if (!kthrotld_workqueue) |
1272 | panic("Failed to create kthrotld\n"); | 1271 | panic("Failed to create kthrotld\n"); |
1273 | 1272 | ||
1274 | blkio_policy_register(&blkio_policy_throtl); | 1273 | return blkio_policy_register(&blkio_policy_throtl); |
1275 | return 0; | ||
1276 | } | 1274 | } |
1277 | 1275 | ||
1278 | module_init(throtl_init); | 1276 | module_init(throtl_init); |