summaryrefslogtreecommitdiffstats
path: root/block/blk-cgroup.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2012-04-01 14:38:45 -0700
committerTejun Heo <tj@kernel.org>2012-04-01 14:38:45 -0700
commit5bc4afb1ec6aa562fac4d9aba34d957ee42f5813 (patch)
treedfef1de2dcb71beab3150ffecf6ae564d326ffba /block/blk-cgroup.h
parentd366e7ec41882791c970dfb7c67b737be8c3a174 (diff)
blkcg: drop BLKCG_STAT_{PRIV|POL|OFF} macros
Now that all stat handling code lives in policy implementations, there's no need to encode policy ID in cft->private. * Export blkcg_prfill_[rw]stat() from blkcg, remove blkcg_print_[rw]stat(), and implement cfqg_print_[rw]stat() which use hard-code BLKIO_POLICY_PROP. * Use cft->private for offset of the target field directly and drop BLKCG_STAT_{PRIV|POL|OFF}(). Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'block/blk-cgroup.h')
-rw-r--r--block/blk-cgroup.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h
index c930895bfac..ca0ff7c0ffb 100644
--- a/block/blk-cgroup.h
+++ b/block/blk-cgroup.h
@@ -34,11 +34,6 @@ enum blkio_policy_id {
#define CFQ_WEIGHT_MAX 1000
#define CFQ_WEIGHT_DEFAULT 500
-/* cft->private [un]packing for stat printing */
-#define BLKCG_STAT_PRIV(pol, off) (((unsigned)(pol) << 16) | (off))
-#define BLKCG_STAT_POL(prv) ((unsigned)(prv) >> 16)
-#define BLKCG_STAT_OFF(prv) ((unsigned)(prv) & 0xffff)
-
enum blkg_rwstat_type {
BLKG_RWSTAT_READ,
BLKG_RWSTAT_WRITE,
@@ -131,10 +126,8 @@ void blkcg_print_blkgs(struct seq_file *sf, struct blkio_cgroup *blkcg,
u64 __blkg_prfill_u64(struct seq_file *sf, void *pdata, u64 v);
u64 __blkg_prfill_rwstat(struct seq_file *sf, void *pdata,
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);
+u64 blkg_prfill_stat(struct seq_file *sf, void *pdata, int off);
+u64 blkg_prfill_rwstat(struct seq_file *sf, void *pdata, int off);
struct blkg_conf_ctx {
struct gendisk *disk;