From: Jens Axboe Date: Fri, 27 Oct 2006 09:10:18 +0000 (+0200) Subject: [PATCH] Fixup iolog config setting X-Git-Tag: fio-1.8~34 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=dad915e36819e74c4540db19faae488ede963ee4;hp=e1f365035a952233463d85d659bd960ba78f012e [PATCH] Fixup iolog config setting Signed-off-by: Jens Axboe --- 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; } /*