From: Vincent Fu Date: Fri, 22 Mar 2024 14:39:37 +0000 (-0400) Subject: Merge branch 'issue-1735' of https://github.com/yygcode/fio X-Git-Tag: fio-3.37~2 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=2b03792ceb7ed00bd50db5b59486fab902295df8;p=fio.git Merge branch 'issue-1735' of https://github.com/yygcode/fio * 'issue-1735' of https://github.com/yygcode/fio: iolog: fix disk stats issue --- 2b03792ceb7ed00bd50db5b59486fab902295df8 diff --cc iolog.c index 251e9d7f,aad6e09b..96af4f33 --- a/iolog.c +++ b/iolog.c @@@ -798,22 -578,18 +798,24 @@@ bool init_iolog(struct thread_data *td * Check if it's a blktrace file and load that if possible. * Otherwise assume it's a normal log file and load that. */ - if (is_blktrace(td->o.read_iolog_file, &need_swap)) - ret = load_blktrace(td, td->o.read_iolog_file, need_swap); - else - ret = init_iolog_read(td); + if (is_blktrace(fname, &need_swap)) { + td->io_log_blktrace = 1; + ret = init_blktrace_read(td, fname, need_swap); + } else { + td->io_log_blktrace = 0; + ret = init_iolog_read(td, fname); + } + free(fname); } else if (td->o.write_iolog_file) ret = init_iolog_write(td); + else + ret = true; - if (ret) + if (!ret) td_verror(td, EINVAL, "failed initializing iolog"); + init_disk_util(td); + return ret; }