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
commit829fdb50004de78f1bd187e428d72edcd9721cb8 (patch)
tree96dbdb62c97e0b7a9a31a7af6d18a6c34e820528 /block/blk-cgroup.h
parent726fa6945e6e5f0389bf47a790e1df734a67de54 (diff)
blkcg: export conf/stat helpers to prepare for reorganization
conf/stat handling is about to be moved to policy implementation from blkcg core. Export conf/stat helpers from blkcg core so that blk-throttle and cfq-iosched can use them. Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'block/blk-cgroup.h')
-rw-r--r--block/blk-cgroup.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h
index 108ffbf0d184..361ecfa4d28d 100644
--- a/block/blk-cgroup.h
+++ b/block/blk-cgroup.h
@@ -15,6 +15,7 @@
15 15
16#include <linux/cgroup.h> 16#include <linux/cgroup.h>
17#include <linux/u64_stats_sync.h> 17#include <linux/u64_stats_sync.h>
18#include <linux/seq_file.h>
18 19
19enum blkio_policy_id { 20enum blkio_policy_id {
20 BLKIO_POLICY_PROP = 0, /* Proportional Bandwidth division */ 21 BLKIO_POLICY_PROP = 0, /* Proportional Bandwidth division */
@@ -193,6 +194,32 @@ extern void blkg_destroy_all(struct request_queue *q, bool destroy_root);
193extern void update_root_blkg_pd(struct request_queue *q, 194extern void update_root_blkg_pd(struct request_queue *q,
194 enum blkio_policy_id plid); 195 enum blkio_policy_id plid);
195 196
197void blkcg_print_blkgs(struct seq_file *sf, struct blkio_cgroup *blkcg,
198 u64 (*prfill)(struct seq_file *, struct blkg_policy_data *, int),
199 int pol, int data, bool show_total);
200u64 __blkg_prfill_u64(struct seq_file *sf, struct blkg_policy_data *pd, u64 v);
201u64 __blkg_prfill_rwstat(struct seq_file *sf, struct blkg_policy_data *pd,
202 const struct blkg_rwstat *rwstat);
203int blkcg_print_stat(struct cgroup *cgrp, struct cftype *cft,
204 struct seq_file *sf);
205int blkcg_print_rwstat(struct cgroup *cgrp, struct cftype *cft,
206 struct seq_file *sf);
207int blkcg_print_cpu_stat(struct cgroup *cgrp, struct cftype *cft,
208 struct seq_file *sf);
209int blkcg_print_cpu_rwstat(struct cgroup *cgrp, struct cftype *cft,
210 struct seq_file *sf);
211
212struct blkg_conf_ctx {
213 struct gendisk *disk;
214 struct blkio_group *blkg;
215 u64 v;
216};
217
218int blkg_conf_prep(struct blkio_cgroup *blkcg, const char *input,
219 struct blkg_conf_ctx *ctx);
220void blkg_conf_finish(struct blkg_conf_ctx *ctx);
221
222
196/** 223/**
197 * blkg_to_pdata - get policy private data 224 * blkg_to_pdata - get policy private data
198 * @blkg: blkg of interest 225 * @blkg: blkg of interest