X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=iolog.c;h=5a41e93fa2644ab98e8a3cf5f24e308aaa05c5b1;hb=10f74940073380f6cb15608053b36a796f879dec;hp=1aeb7a76b2b6ca21ab8bd3d5c18e5ec200669fcb;hpb=a7194b2d3d427e7e5678c55a128639df9caf4a48;p=fio.git diff --git a/iolog.c b/iolog.c index 1aeb7a76..5a41e93f 100644 --- a/iolog.c +++ b/iolog.c @@ -152,10 +152,15 @@ int read_iolog_get(struct thread_data *td, struct io_u *io_u) while (!flist_empty(&td->io_log_list)) { int ret; - if (!td->io_log_blktrace && td->o.read_iolog_chunked) { + if (td->o.read_iolog_chunked) { if (td->io_log_checkmark == td->io_log_current) { - if (!read_iolog2(td)) - return 1; + if (td->io_log_blktrace) { + if (!read_blktrace(td)) + return 1; + } else { + if (!read_iolog2(td)) + return 1; + } } td->io_log_current--; } @@ -355,7 +360,7 @@ void write_iolog_close(struct thread_data *td) td->iolog_buf = NULL; } -static int64_t iolog_items_to_fetch(struct thread_data *td) +int64_t iolog_items_to_fetch(struct thread_data *td) { struct timespec now; uint64_t elapsed; @@ -709,7 +714,7 @@ bool init_iolog(struct thread_data *td) */ if (is_blktrace(fname, &need_swap)) { td->io_log_blktrace = 1; - ret = load_blktrace(td, fname, need_swap); + ret = init_blktrace_read(td, fname, need_swap); } else { td->io_log_blktrace = 0; ret = init_iolog_read(td, fname);