From: Niklas Cassel Date: Thu, 3 Feb 2022 19:28:29 +0000 (+0000) Subject: stat: increment members counter after call to sum_thread_stats() X-Git-Tag: fio-3.30~66 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=a381c018f3811e701a1fdbb2c0ed2a6981a18443;p=fio.git stat: increment members counter after call to sum_thread_stats() Increment ts->members after the call to sum_thread_stats(), just like how it's done in client.c and gclient.c. There is no reason why stat.c should increment ts->members before calling sum_thread_stats(). Change stat.c so that it is consistent with client.c and gclient.c. This way, sum_thread_stats() could actually make use of ts->members (if it wanted to), since it is now being updated consistently. No logical change, as currently, ts->members is only used in show_thread_status_normal(), which is always called after the call to sum_thread_stats(). Signed-off-by: Niklas Cassel Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20220203192814.18552-12-Niklas.Cassel@wdc.com Signed-off-by: Jens Axboe --- diff --git a/stat.c b/stat.c index d7f7362b..63341512 100644 --- a/stat.c +++ b/stat.c @@ -2241,7 +2241,6 @@ void __show_run_stats(void) opt_lists[j] = &td->opt_list; idx++; - ts->members++; if (ts->groupid == -1) { /* @@ -2308,6 +2307,8 @@ void __show_run_stats(void) sum_thread_stats(ts, &td->ts); + ts->members++; + if (td->o.ss_dur) { ts->ss_state = td->ss.state; ts->ss_dur = td->ss.dur;