aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-cgroup.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2012-03-05 16:15:08 -0500
committerJens Axboe <axboe@kernel.dk>2012-03-06 15:27:22 -0500
commit4bfd482e73b30284cb21e10834ce729fa81aa256 (patch)
tree2c39e09592113946e3545013199b0e00a21f60f2 /block/blk-cgroup.h
parente56da7e287967667474a58c4f60c286279e3f487 (diff)
blkcg: kill blkio_policy_node
Now that blkcg configuration lives in blkg's, blkio_policy_node is no longer necessary. Kill it. blkio_policy_parse_and_set() now fails if invoked for missing device and functions to print out configurations are updated to print from blkg's. cftype_blkg_same_policy() is dropped along with other policy functions for consistency. Its one line is open coded in the only user - blkio_read_blkg_stats(). -v2: Update to reflect the retry-on-bypass logic change of the previous patch. 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-cgroup.h')
-rw-r--r--block/blk-cgroup.h32
1 files changed, 0 insertions, 32 deletions
diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h
index 81efe718a1c6..9a5c68d7cc92 100644
--- a/block/blk-cgroup.h
+++ b/block/blk-cgroup.h
@@ -112,7 +112,6 @@ struct blkio_cgroup {
112 unsigned int weight; 112 unsigned int weight;
113 spinlock_t lock; 113 spinlock_t lock;
114 struct hlist_head blkg_list; 114 struct hlist_head blkg_list;
115 struct list_head policy_list; /* list of blkio_policy_node */
116}; 115};
117 116
118struct blkio_group_stats { 117struct blkio_group_stats {
@@ -182,37 +181,6 @@ struct blkio_group {
182 struct blkio_group_stats_cpu __percpu *stats_cpu; 181 struct blkio_group_stats_cpu __percpu *stats_cpu;
183}; 182};
184 183
185struct blkio_policy_node {
186 struct list_head node;
187 dev_t dev;
188 /* This node belongs to max bw policy or porportional weight policy */
189 enum blkio_policy_id plid;
190 /* cgroup file to which this rule belongs to */
191 int fileid;
192
193 union {
194 unsigned int weight;
195 /*
196 * Rate read/write in terms of bytes per second
197 * Whether this rate represents read or write is determined
198 * by file type "fileid".
199 */
200 u64 bps;
201 unsigned int iops;
202 } val;
203};
204
205extern unsigned int blkcg_get_weight(struct blkio_cgroup *blkcg,
206 dev_t dev);
207extern uint64_t blkcg_get_read_bps(struct blkio_cgroup *blkcg,
208 dev_t dev);
209extern uint64_t blkcg_get_write_bps(struct blkio_cgroup *blkcg,
210 dev_t dev);
211extern unsigned int blkcg_get_read_iops(struct blkio_cgroup *blkcg,
212 dev_t dev);
213extern unsigned int blkcg_get_write_iops(struct blkio_cgroup *blkcg,
214 dev_t dev);
215
216typedef struct blkio_group *(blkio_alloc_group_fn)(struct request_queue *q, 184typedef struct blkio_group *(blkio_alloc_group_fn)(struct request_queue *q,
217 struct blkio_cgroup *blkcg); 185 struct blkio_cgroup *blkcg);
218typedef void (blkio_link_group_fn)(struct request_queue *q, 186typedef void (blkio_link_group_fn)(struct request_queue *q,