From dad915e36819e74c4540db19faae488ede963ee4 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Fri, 27 Oct 2006 11:10:18 +0200 Subject: [PATCH] [PATCH] Fixup iolog config setting Signed-off-by: Jens Axboe --- init.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/init.c b/init.c index 2dbf805d..4ce2cc4b 100644 --- a/init.c +++ b/init.c @@ -103,7 +103,7 @@ static struct fio_option options[] = { }, { .name = "write_iolog", - .type = FIO_OPT_STR_STORE, + .type = FIO_OPT_INT, .off1 = td_var_offset(write_iolog), }, { @@ -391,6 +391,10 @@ static void put_job(struct thread_data *td) thread_number--; } +/* + * Lazy way of fixing up options that depend on each other. We could also + * define option callback handlers, but this is easier. + */ static void fixup_options(struct thread_data *td) { if (!td->min_bs) @@ -400,6 +404,9 @@ static void fixup_options(struct thread_data *td) if (!td->rwmixread && td->rwmixwrite) td->rwmixread = 100 - td->rwmixwrite; + + if (td->iolog && !td->write_iolog) + td->read_iolog = 1; } /* -- 2.25.1