From 72c27ff8f2eaf945ae34776dab4da3fee753707d Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Sun, 16 Oct 2011 11:50:31 +0200 Subject: [PATCH] Fix problem with mixing is_backend and terse_output Always send disk util and group_run_stats, even if terse output got set in the server. Also fixes a disk util leak for !terse_output. Signed-off-by: Jens Axboe --- stat.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/stat.c b/stat.c index d54aa85d..19b36961 100644 --- a/stat.c +++ b/stat.c @@ -1012,25 +1012,23 @@ void show_run_stats(void) show_thread_status(ts, rs); } - if (!terse_output) { - for (i = 0; i < groupid + 1; i++) { - rs = &runstats[i]; - - rs->groupid = i; - if (is_backend) - fio_server_send_gs(rs); - else - show_group_stats(rs); - } + for (i = 0; i < groupid + 1; i++) { + rs = &runstats[i]; + rs->groupid = i; if (is_backend) - fio_server_send_du(); - else - show_disk_util(0); - - free_disk_util(); + fio_server_send_gs(rs); + else if (!terse_output) + show_group_stats(rs); } + if (is_backend) + fio_server_send_du(); + else if (!terse_output) + show_disk_util(0); + + free_disk_util(); + free(runstats); free(threadstats); } -- 2.25.1