From 1f84f1d9f85fe17c83eba504e4fb9b09a082e517 Mon Sep 17 00:00:00 2001 From: Dan Ehrenberg Date: Sat, 23 Jul 2011 13:36:44 +0200 Subject: [PATCH] Respect iodepth_batch_complete=0 in main loop If the iodepth_batch_complete is 0, then even if the queue is full, we still don't make min_events be 1 in the main loop. Instead, poll in a non-blocking way until a result is found. Signed-off-by: Dan Ehrenberg Signed-off-by: Jens Axboe --- fio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fio.c b/fio.c index 120431e9..73964214 100644 --- a/fio.c +++ b/fio.c @@ -557,7 +557,7 @@ sync_done: if (full || !td->o.iodepth_batch_complete) { min_events = min(td->o.iodepth_batch_complete, td->cur_depth); - if (full && !min_events) + if (full && !min_events && td->o.iodepth_batch_complete != 0) min_events = 1; do { @@ -719,7 +719,7 @@ sync_done: if (full || !td->o.iodepth_batch_complete) { min_evts = min(td->o.iodepth_batch_complete, td->cur_depth); - if (full && !min_evts) + if (full && !min_evts && td->o.iodepth_batch_complete != 0) min_evts = 1; if (__should_check_rate(td, 0) || -- 2.25.1