X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=iolog.c;h=ec29971f6a51dfd2d67dc3e00f0c90a76264c7fc;hp=9bcf0d8e2982e37ce5d48fbd64e9653872e54ea0;hb=621677626f2551bedfdc4a5fc3b3e5f8492b94fa;hpb=ba9c7219eefcc04e84a4fb4970f4b5caeaf48aa6 diff --git a/iolog.c b/iolog.c index 9bcf0d8e..ec29971f 100644 --- a/iolog.c +++ b/iolog.c @@ -188,6 +188,7 @@ void log_io_piece(struct thread_data *td, struct io_u *io_u) ipo->file = io_u->file; ipo->offset = io_u->offset; ipo->len = io_u->buflen; + ipo->numberio = io_u->numberio; if (io_u_should_trim(td, io_u)) { flist_add_tail(&ipo->trim_list, &td->trim_list); @@ -480,17 +481,22 @@ int init_iolog(struct thread_data *td) int ret = 0; if (td->o.read_iolog_file) { + int need_swap; + /* * 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)) - ret = load_blktrace(td, td->o.read_iolog_file); + 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); } else if (td->o.write_iolog_file) ret = init_iolog_write(td); + if (ret) + td_verror(td, EINVAL, "failed initializing iolog"); + return ret; }