fix disk stats issue

This commit is contained in:
cenhuilin 2024-04-16 14:44:36 +08:00
parent ed3d62e48e
commit 6a4d810343
2 changed files with 37 additions and 1 deletions

View File

@ -0,0 +1,31 @@
From c492cb1a9b1c327e985c89eb517d58bd5323880c Mon Sep 17 00:00:00 2001
From: Yong Gang <yygcode@gmail.com>
Date: Tue, 16 Apr 2024 14:11:37 +0800
Subject: [PATCH] iolog: fix disk stats issue
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: #1735
Signed-off-by: Yong Gang <yygcode@gmail.com>
---
iolog.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/iolog.c b/iolog.c
index cc2cbc6..66c8007 100644
--- a/iolog.c
+++ b/iolog.c
@@ -812,6 +812,8 @@ bool init_iolog(struct thread_data *td)
if (!ret)
td_verror(td, EINVAL, "failed initializing iolog");
+ init_disk_util(td);
+
return ret;
}
--
2.27.0

View File

@ -1,12 +1,14 @@
Name: fio Name: fio
Version: 3.34 Version: 3.34
Release: 2 Release: 3
Summary: Multithreaded IO generation tool Summary: Multithreaded IO generation tool
License: GPLv2 License: GPLv2
URL: http://git.kernel.dk/?p=fio.git;a=summary URL: http://git.kernel.dk/?p=fio.git;a=summary
Source0: http://brick.kernel.dk/snaps/%{name}-%{version}.tar.bz2 Source0: http://brick.kernel.dk/snaps/%{name}-%{version}.tar.bz2
#https://github.com/axboe/fio/pull/1736
Patch0001: 0001-fix-disk-stats-issue.patch
BuildRequires: gcc BuildRequires: gcc
BuildRequires: libaio-devel BuildRequires: libaio-devel
@ -80,6 +82,9 @@ make test
%changelog %changelog
* Tue Apr 16 2024 cenhuilin <cenhuilin@kylinos.cn> - 3.34-3
- iolog: fix disk stats issue
* Tue Mar 5 2024 wangxiaomeng <wangxiaomeng@klinos.cn> - 3.34-2 * Tue Mar 5 2024 wangxiaomeng <wangxiaomeng@klinos.cn> - 3.34-2
- Add BuildRequires gperftools-devel to link tcmalloc. - Add BuildRequires gperftools-devel to link tcmalloc.