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-throttle.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'block/blk-throttle.c') diff --git a/block/blk-throttle.c b/block/blk-throttle.c index bd6dbfe1e4e..60240142f5a 100644 --- a/block/blk-throttle.c +++ b/block/blk-throttle.c @@ -941,15 +941,13 @@ static u64 tg_prfill_cpu_rwstat(struct seq_file *sf, void *pdata, int off) return __blkg_prfill_rwstat(sf, pdata, &rwstat); } -/* print per-cpu blkg_rwstat specified by BLKCG_STAT_PRIV() */ static int tg_print_cpu_rwstat(struct cgroup *cgrp, struct cftype *cft, struct seq_file *sf) { struct blkio_cgroup *blkcg = cgroup_to_blkio_cgroup(cgrp); - blkcg_print_blkgs(sf, blkcg, tg_prfill_cpu_rwstat, - BLKCG_STAT_POL(cft->private), - BLKCG_STAT_OFF(cft->private), true); + blkcg_print_blkgs(sf, blkcg, tg_prfill_cpu_rwstat, BLKIO_POLICY_THROTL, + cft->private, true); return 0; } @@ -1067,14 +1065,12 @@ static struct cftype throtl_files[] = { }, { .name = "throttle.io_service_bytes", - .private = BLKCG_STAT_PRIV(BLKIO_POLICY_THROTL, - offsetof(struct tg_stats_cpu, service_bytes)), + .private = offsetof(struct tg_stats_cpu, service_bytes), .read_seq_string = tg_print_cpu_rwstat, }, { .name = "throttle.io_serviced", - .private = BLKCG_STAT_PRIV(BLKIO_POLICY_THROTL, - offsetof(struct tg_stats_cpu, serviced)), + .private = offsetof(struct tg_stats_cpu, serviced), .read_seq_string = tg_print_cpu_rwstat, }, { } /* terminate */ -- cgit v1.2.3-18-g5258