diff options
author | Tejun Heo <tj@kernel.org> | 2012-04-01 17:38:43 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2012-04-01 17:38:43 -0400 |
commit | 60c2bc2d5a12369deef395cda41638d7e6b6bf19 (patch) | |
tree | 67fb6ace87a930215f800f0a96bb33f9773231c7 /block/blk-cgroup.h | |
parent | 44ea53de46a8b01a65ae6217f47e00b516725190 (diff) |
blkcg: move conf/stat file handling code to policies
blkcg conf/stat handling is convoluted in that details which belong to
specific policy implementations are all out in blkcg core and then
policies hook into core layer to access and manipulate confs and
stats. This sadly achieves both inflexibility (confs/stats can't be
modified without messing with blkcg core) and complexity (all the
call-ins and call-backs).
The previous patches restructured conf and stat handling code such
that they can be separated out. This patch relocates the file
handling part. All conf/stat file handling code which belongs to
BLKIO_POLICY_PROP is moved to cfq-iosched.c and all
BKLIO_POLICY_THROTL code to blk-throtl.c.
The move is verbatim except for blkio_update_group_{weight|bps|iops}()
callbacks which relays conf changes to policies. The configuration
settings are handled in policies themselves so the relaying isn't
necessary. Conf setting functions are modified to directly call
per-policy update functions and the relaying mechanism is dropped.
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'block/blk-cgroup.h')
-rw-r--r-- | block/blk-cgroup.h | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h index fa744d57bebb..ba64b2857571 100644 --- a/block/blk-cgroup.h +++ b/block/blk-cgroup.h | |||
@@ -156,24 +156,9 @@ struct blkio_group { | |||
156 | }; | 156 | }; |
157 | 157 | ||
158 | typedef void (blkio_init_group_fn)(struct blkio_group *blkg); | 158 | typedef void (blkio_init_group_fn)(struct blkio_group *blkg); |
159 | typedef void (blkio_update_group_weight_fn)(struct request_queue *q, | ||
160 | struct blkio_group *blkg, unsigned int weight); | ||
161 | typedef void (blkio_update_group_read_bps_fn)(struct request_queue *q, | ||
162 | struct blkio_group *blkg, u64 read_bps); | ||
163 | typedef void (blkio_update_group_write_bps_fn)(struct request_queue *q, | ||
164 | struct blkio_group *blkg, u64 write_bps); | ||
165 | typedef void (blkio_update_group_read_iops_fn)(struct request_queue *q, | ||
166 | struct blkio_group *blkg, unsigned int read_iops); | ||
167 | typedef void (blkio_update_group_write_iops_fn)(struct request_queue *q, | ||
168 | struct blkio_group *blkg, unsigned int write_iops); | ||
169 | 159 | ||
170 | struct blkio_policy_ops { | 160 | struct blkio_policy_ops { |
171 | blkio_init_group_fn *blkio_init_group_fn; | 161 | blkio_init_group_fn *blkio_init_group_fn; |
172 | blkio_update_group_weight_fn *blkio_update_group_weight_fn; | ||
173 | blkio_update_group_read_bps_fn *blkio_update_group_read_bps_fn; | ||
174 | blkio_update_group_write_bps_fn *blkio_update_group_write_bps_fn; | ||
175 | blkio_update_group_read_iops_fn *blkio_update_group_read_iops_fn; | ||
176 | blkio_update_group_write_iops_fn *blkio_update_group_write_iops_fn; | ||
177 | }; | 162 | }; |
178 | 163 | ||
179 | struct blkio_policy_type { | 164 | struct blkio_policy_type { |