From cbb1303c21eb43f59c4d2a4bf97a856eb8863773 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Mon, 9 Jun 2014 13:25:13 -0600 Subject: [PATCH] Fix regression introduced by commit 334185e We need to run fio_time_init() before the threads are invoked, but we should do it in global context so that all threads share the same clock and init settings. Signed-off-by: Jens Axboe --- backend.c | 5 ----- server.c | 1 + 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/backend.c b/backend.c index d1d55718..23fa345b 100644 --- a/backend.c +++ b/backend.c @@ -1270,11 +1270,6 @@ static void *thread_main(void *data) } else td->pid = gettid(); - /* - * fio_time_init() may not have been called yet if running as a server - */ - fio_time_init(); - fio_local_clock_init(o->use_thread); dprint(FD_PROCESS, "jobs pid=%d started\n", (int) td->pid); diff --git a/server.c b/server.c index 077dce5c..88655025 100644 --- a/server.c +++ b/server.c @@ -555,6 +555,7 @@ static int handle_run_cmd(struct flist_head *job_list, struct fio_net_cmd *cmd) pid_t pid; int ret; + fio_time_init(); set_genesis_time(); pid = fork(); -- 2.25.1