From: Jens Axboe Date: Mon, 9 Jun 2014 19:25:13 +0000 (-0600) Subject: Fix regression introduced by commit 334185e X-Git-Tag: fio-2.1.10~4 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=cbb1303c21eb43f59c4d2a4bf97a856eb8863773;p=fio.git 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 --- 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();