diff options
author | Tejun Heo <tj@kernel.org> | 2012-04-01 23:38:43 +0200 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2012-04-01 23:38:43 +0200 |
commit | 829fdb50004de78f1bd187e428d72edcd9721cb8 (patch) | |
tree | 96dbdb62c97e0b7a9a31a7af6d18a6c34e820528 /block/blk-cgroup.h | |
parent | blkcg: simplify blkg_conf_prep() (diff) | |
download | linux-829fdb50004de78f1bd187e428d72edcd9721cb8.tar.xz linux-829fdb50004de78f1bd187e428d72edcd9721cb8.zip |
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.h | 27 |
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 @@ #include <linux/cgroup.h> #include <linux/u64_stats_sync.h> +#include <linux/seq_file.h> enum blkio_policy_id { BLKIO_POLICY_PROP = 0, /* Proportional Bandwidth division */ @@ -193,6 +194,32 @@ extern void blkg_destroy_all(struct request_queue *q, bool destroy_root); extern void update_root_blkg_pd(struct request_queue *q, enum blkio_policy_id plid); +void blkcg_print_blkgs(struct seq_file *sf, struct blkio_cgroup *blkcg, + u64 (*prfill)(struct seq_file *, struct blkg_policy_data *, int), + int pol, int data, bool show_total); +u64 __blkg_prfill_u64(struct seq_file *sf, struct blkg_policy_data *pd, u64 v); +u64 __blkg_prfill_rwstat(struct seq_file *sf, struct blkg_policy_data *pd, + const struct blkg_rwstat *rwstat); +int blkcg_print_stat(struct cgroup *cgrp, struct cftype *cft, + struct seq_file *sf); +int blkcg_print_rwstat(struct cgroup *cgrp, struct cftype *cft, + struct seq_file *sf); +int blkcg_print_cpu_stat(struct cgroup *cgrp, struct cftype *cft, + struct seq_file *sf); +int blkcg_print_cpu_rwstat(struct cgroup *cgrp, struct cftype *cft, + struct seq_file *sf); + +struct blkg_conf_ctx { + struct gendisk *disk; + struct blkio_group *blkg; + u64 v; +}; + +int blkg_conf_prep(struct blkio_cgroup *blkcg, const char *input, + struct blkg_conf_ctx *ctx); +void blkg_conf_finish(struct blkg_conf_ctx *ctx); + + /** * blkg_to_pdata - get policy private data * @blkg: blkg of interest |