From 5bc4afb1ec6aa562fac4d9aba34d957ee42f5813 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Sun, 1 Apr 2012 14:38:45 -0700 Subject: 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 --- block/blk-cgroup.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'block/blk-cgroup.h') diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h index c930895bfac9..ca0ff7c0ffb6 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; -- cgit v1.2.3