stats: Add a function to report completion latency percentiles
[fio.git] / fio.c
diff --git a/fio.c b/fio.c
index 120431e90cb2c1ec1693aac1f56ad2a4aa150e59..73964214d3468d93a4f0ed72f4ecbd330f57b9c6 100644 (file)
--- 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) ||