iolog: fix disk stats issue
authoryonggang.yyg <yygcode@gmail.com>
Wed, 20 Mar 2024 16:10:03 +0000 (00:10 +0800)
committeryonggang.yyg <yygcode@gmail.com>
Fri, 22 Mar 2024 14:31:01 +0000 (22:31 +0800)
In the iolog replay scenario, the disk util in the td structure is
not initialized, resulting in the disk stats not being correctly
updated.

Fixes: https://github.com/axboe/fio/issues/1735

Signed-off-by: Yong Gang <yygcode@gmail.com>
iolog.c

diff --git a/iolog.c b/iolog.c
index 760d7b0a43d97962bb7d065c6e464c7b89a7f5f5..aad6e09b8929ed4ca9541261b16c249a64313359 100644 (file)
--- a/iolog.c
+++ b/iolog.c
@@ -588,6 +588,8 @@ int init_iolog(struct thread_data *td)
        if (ret)
                td_verror(td, EINVAL, "failed initializing iolog");
 
+       init_disk_util(td);
+
        return ret;
 }