aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-cgroup.h
diff options
context:
space:
mode:
Diffstat (limited to 'block/blk-cgroup.h')
-rw-r--r--block/blk-cgroup.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h
index 1b738827b2f6..2070053a30b1 100644
--- a/block/blk-cgroup.h
+++ b/block/blk-cgroup.h
@@ -93,6 +93,8 @@ enum blkcg_file_name_prop {
93enum blkcg_file_name_throtl { 93enum blkcg_file_name_throtl {
94 BLKIO_THROTL_read_bps_device, 94 BLKIO_THROTL_read_bps_device,
95 BLKIO_THROTL_write_bps_device, 95 BLKIO_THROTL_write_bps_device,
96 BLKIO_THROTL_read_iops_device,
97 BLKIO_THROTL_write_iops_device,
96 BLKIO_THROTL_io_service_bytes, 98 BLKIO_THROTL_io_service_bytes,
97 BLKIO_THROTL_io_serviced, 99 BLKIO_THROTL_io_serviced,
98}; 100};
@@ -168,6 +170,7 @@ struct blkio_policy_node {
168 * by file type "fileid". 170 * by file type "fileid".
169 */ 171 */
170 u64 bps; 172 u64 bps;
173 unsigned int iops;
171 } val; 174 } val;
172}; 175};
173 176
@@ -177,6 +180,10 @@ extern uint64_t blkcg_get_read_bps(struct blkio_cgroup *blkcg,
177 dev_t dev); 180 dev_t dev);
178extern uint64_t blkcg_get_write_bps(struct blkio_cgroup *blkcg, 181extern uint64_t blkcg_get_write_bps(struct blkio_cgroup *blkcg,
179 dev_t dev); 182 dev_t dev);
183extern unsigned int blkcg_get_read_iops(struct blkio_cgroup *blkcg,
184 dev_t dev);
185extern unsigned int blkcg_get_write_iops(struct blkio_cgroup *blkcg,
186 dev_t dev);
180 187
181typedef void (blkio_unlink_group_fn) (void *key, struct blkio_group *blkg); 188typedef void (blkio_unlink_group_fn) (void *key, struct blkio_group *blkg);
182typedef void (blkio_update_group_weight_fn) (struct blkio_group *blkg, 189typedef void (blkio_update_group_weight_fn) (struct blkio_group *blkg,
@@ -185,12 +192,18 @@ typedef void (blkio_update_group_read_bps_fn) (struct blkio_group *blkg,
185 u64 read_bps); 192 u64 read_bps);
186typedef void (blkio_update_group_write_bps_fn) (struct blkio_group *blkg, 193typedef void (blkio_update_group_write_bps_fn) (struct blkio_group *blkg,
187 u64 write_bps); 194 u64 write_bps);
195typedef void (blkio_update_group_read_iops_fn) (struct blkio_group *blkg,
196 unsigned int read_iops);
197typedef void (blkio_update_group_write_iops_fn) (struct blkio_group *blkg,
198 unsigned int write_iops);
188 199
189struct blkio_policy_ops { 200struct blkio_policy_ops {
190 blkio_unlink_group_fn *blkio_unlink_group_fn; 201 blkio_unlink_group_fn *blkio_unlink_group_fn;
191 blkio_update_group_weight_fn *blkio_update_group_weight_fn; 202 blkio_update_group_weight_fn *blkio_update_group_weight_fn;
192 blkio_update_group_read_bps_fn *blkio_update_group_read_bps_fn; 203 blkio_update_group_read_bps_fn *blkio_update_group_read_bps_fn;
193 blkio_update_group_write_bps_fn *blkio_update_group_write_bps_fn; 204 blkio_update_group_write_bps_fn *blkio_update_group_write_bps_fn;
205 blkio_update_group_read_iops_fn *blkio_update_group_read_iops_fn;
206 blkio_update_group_write_iops_fn *blkio_update_group_write_iops_fn;
194}; 207};
195 208
196struct blkio_policy_type { 209struct blkio_policy_type {