From: Josef Bacik <[email protected]>

Batch isn't at all related to what it's actually used for, which is the
running sum of time spent doing IO.  Rename it to time so it makes
logical sense.

Signed-off-by: Josef Bacik <[email protected]>
---
 block/blk-stat.c          | 6 +++---
 include/linux/blk_types.h | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/block/blk-stat.c b/block/blk-stat.c
index 940f15d600f8..1529f22044bd 100644
--- a/block/blk-stat.c
+++ b/block/blk-stat.c
@@ -22,7 +22,7 @@ void blk_rq_stat_init(struct blk_rq_stat *stat)
 {
        stat->min = -1ULL;
        stat->max = stat->nr_samples = stat->mean = 0;
-       stat->batch = 0;
+       stat->time = 0;
 }
 
 /* src is a per-cpu stat, mean isn't initialized */
@@ -34,7 +34,7 @@ void blk_rq_stat_sum(struct blk_rq_stat *dst, struct 
blk_rq_stat *src)
        dst->min = min(dst->min, src->min);
        dst->max = max(dst->max, src->max);
 
-       dst->mean = div_u64(src->batch + dst->mean * dst->nr_samples,
+       dst->mean = div_u64(src->time + dst->mean * dst->nr_samples,
                                dst->nr_samples + src->nr_samples);
 
        dst->nr_samples += src->nr_samples;
@@ -44,7 +44,7 @@ void blk_rq_stat_add(struct blk_rq_stat *stat, u64 value)
 {
        stat->min = min(stat->min, value);
        stat->max = max(stat->max, value);
-       stat->batch += value;
+       stat->time += value;
        stat->nr_samples++;
 }
 
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index 95202f80676c..6406430c517a 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -442,7 +442,7 @@ struct blk_rq_stat {
        u64 min;
        u64 max;
        u32 nr_samples;
-       u64 batch;
+       u64 time;
 };
 
 #endif /* __LINUX_BLK_TYPES_H */
-- 
2.17.1

Reply via email to