From 8d7ad8d9d737982f7967f91f00ba9a56402fc60b Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 9 Jan 2007 21:22:18 +0100 Subject: [PATCH] [PATCH] Move timeout structure where it is used Also makes sure that it's always initialized to 0's. Signed-off-by: Jens Axboe --- fio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fio.c b/fio.c index e8181a1c..28f6376d 100644 --- a/fio.c +++ b/fio.c @@ -379,7 +379,6 @@ static void do_io(struct thread_data *td) td_set_runstate(td, TD_RUNNING); while (td->this_io_bytes[td->ddir] < td->io_size) { - struct timespec ts = { .tv_sec = 0, .tv_nsec = 0}; struct timespec *timeout; int min_evts = 0; struct io_u *io_u; @@ -407,6 +406,8 @@ static void do_io(struct thread_data *td) add_slat_sample(td, io_u->ddir, mtime_since(&io_u->start_time, &io_u->issue_time)); if (td->cur_depth < td->iodepth) { + struct timespec ts = { .tv_sec = 0, .tv_nsec = 0}; + timeout = &ts; min_evts = 0; } else { -- 2.25.1