From fcb11708806c026566f2af58833ea919419a066d Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Wed, 25 Apr 2007 14:11:18 +0200 Subject: [PATCH] Fix read_iolog Caveat - it only works with 1 file, unfortunately. Will need a format change to get that right. Signed-off-by: Jens Axboe --- fio.h | 1 - io_u.c | 2 +- log.c | 5 +++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/fio.h b/fio.h index f9f2a577..060a1ee5 100644 --- a/fio.h +++ b/fio.h @@ -404,7 +404,6 @@ struct thread_options { unsigned int numjobs; os_cpu_mask_t cpumask; unsigned int iolog; - unsigned int read_iolog; unsigned int rwmixcycle; unsigned int rwmix[2]; unsigned int nice; diff --git a/io_u.c b/io_u.c index d5dd84b9..99f07288 100644 --- a/io_u.c +++ b/io_u.c @@ -289,7 +289,7 @@ static int fill_io_u(struct thread_data *td, struct io_u *io_u) /* * If using an iolog, grab next piece if any available. */ - if (td->o.read_iolog) + if (td->o.read_iolog_file) return read_iolog_get(td, io_u); /* diff --git a/log.c b/log.c index 45be5fb6..de3b759c 100644 --- a/log.c +++ b/log.c @@ -19,6 +19,11 @@ int read_iolog_get(struct thread_data *td, struct io_u *io_u) io_u->buflen = ipo->len; io_u->ddir = ipo->ddir; io_u->file = ipo->file; + /* + * work around, this needs a format change to work for > 1 file + */ + if (!io_u->file) + io_u->file = &td->files[0]; free(ipo); return 0; } -- 2.25.1