From 5087502fb05b2b4d756045c594a2e09c2ffc97dc Mon Sep 17 00:00:00 2001 From: Vincent Fu Date: Tue, 20 Jun 2023 14:11:36 -0400 Subject: [PATCH] init: don't adjust time units again for subjobs We adjust max_latency and latency_target values to be nsec internally. Make sure we do this only once for the parent job and don't do it a second time for a subjob. Fixes: https://github.com/axboe/fio/issues/1582 Signed-off-by: Vincent Fu --- init.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/init.c b/init.c index 437406ec..10e63cca 100644 --- a/init.c +++ b/init.c @@ -951,13 +951,16 @@ static int fixup_options(struct thread_data *td) if (o->disable_slat) o->slat_percentiles = 0; - /* - * Fix these up to be nsec internally - */ - for_each_rw_ddir(ddir) - o->max_latency[ddir] *= 1000ULL; + /* Do this only for the parent job */ + if (!td->subjob_number) { + /* + * Fix these up to be nsec internally + */ + for_each_rw_ddir(ddir) + o->max_latency[ddir] *= 1000ULL; - o->latency_target *= 1000ULL; + o->latency_target *= 1000ULL; + } /* * Dedupe working set verifications -- 2.25.1