aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-cgroup.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2012-04-01 17:38:43 -0400
committerTejun Heo <tj@kernel.org>2012-04-01 17:38:43 -0400
commit60c2bc2d5a12369deef395cda41638d7e6b6bf19 (patch)
tree67fb6ace87a930215f800f0a96bb33f9773231c7 /block/blk-cgroup.h
parent44ea53de46a8b01a65ae6217f47e00b516725190 (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.h15
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
158typedef void (blkio_init_group_fn)(struct blkio_group *blkg); 158typedef void (blkio_init_group_fn)(struct blkio_group *blkg);
159typedef void (blkio_update_group_weight_fn)(struct request_queue *q,
160 struct blkio_group *blkg, unsigned int weight);
161typedef void (blkio_update_group_read_bps_fn)(struct request_queue *q,
162 struct blkio_group *blkg, u64 read_bps);
163typedef void (blkio_update_group_write_bps_fn)(struct request_queue *q,
164 struct blkio_group *blkg, u64 write_bps);
165typedef void (blkio_update_group_read_iops_fn)(struct request_queue *q,
166 struct blkio_group *blkg, unsigned int read_iops);
167typedef void (blkio_update_group_write_iops_fn)(struct request_queue *q,
168 struct blkio_group *blkg, unsigned int write_iops);
169 159
170struct blkio_policy_ops { 160struct 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
179struct blkio_policy_type { 164struct blkio_policy_type {