stat: fix high/low prio unified rw bug
authorVincent Fu <vincent.fu@wdc.com>
Fri, 31 Jan 2020 22:27:26 +0000 (17:27 -0500)
committerVincent Fu <vincent.fu@wdc.com>
Tue, 4 Feb 2020 15:14:04 +0000 (10:14 -0500)
With unified_rw_reporting enabled, high/low priority summary statistics
were not correctly reported. This patch fixes the problem.

Signed-off-by: Vincent Fu <vincent.fu@wdc.com>
stat.c

diff --git a/stat.c b/stat.c
index 55f2d8b2871dd5b0ce20c036f706d64c47bb00d8..69d57b696ce3ab2b7782210012bcd4002a40433e 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -1888,8 +1888,8 @@ void sum_thread_stats(struct thread_stat *dst, struct thread_stat *src,
                                dst->runtime[l] = src->runtime[l];
                } else {
                        sum_stat(&dst->clat_stat[0], &src->clat_stat[l], first, false);
-                       sum_stat(&dst->clat_high_prio_stat[l], &src->clat_high_prio_stat[l], first, false);
-                       sum_stat(&dst->clat_low_prio_stat[l], &src->clat_low_prio_stat[l], first, false);
+                       sum_stat(&dst->clat_high_prio_stat[0], &src->clat_high_prio_stat[l], first, false);
+                       sum_stat(&dst->clat_low_prio_stat[0], &src->clat_low_prio_stat[l], first, false);
                        sum_stat(&dst->slat_stat[0], &src->slat_stat[l], first, false);
                        sum_stat(&dst->lat_stat[0], &src->lat_stat[l], first, false);
                        sum_stat(&dst->bw_stat[0], &src->bw_stat[l], first, true);