From: Jens Axboe Date: Tue, 20 Feb 2007 09:45:57 +0000 (+0100) Subject: Use 0 timeout for command completion peek X-Git-Tag: fio-1.12~56 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=00de55ef85f01f3c56fac5397aca92eef0c73762;p=fio.git Use 0 timeout for command completion peek Signed-off-by: Jens Axboe --- diff --git a/io_u.c b/io_u.c index 4f4865b2..ab46cbe7 100644 --- a/io_u.c +++ b/io_u.c @@ -526,6 +526,7 @@ long io_u_queued_complete(struct thread_data *td, int min_events, { struct io_completion_data icd; + struct timespec *tvp = NULL; int ret; if (min_events > 0) { @@ -534,9 +535,13 @@ long io_u_queued_complete(struct thread_data *td, int min_events, td_verror(td, -ret); return ret; } + } else { + struct timespec ts = { .tv_sec = 0, .tv_nsec = 0, }; + + tvp = &ts; } - ret = td_io_getevents(td, min_events, td->cur_depth, NULL); + ret = td_io_getevents(td, min_events, td->cur_depth, tvp); if (ret < 0) { td_verror(td, -ret); return ret;