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 <dehrenberg@google.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
diff --git a/fio.c b/fio.c
index 120431e..7396421 100644
--- a/fio.c
+++ b/fio.c
@@ -557,7 +557,7 @@
 		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 @@
 		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) ||