Enable completion latency stat collection on verify
[fio.git] / io_u.c
diff --git a/io_u.c b/io_u.c
index 54f8685bc5c510608e3a6e5e7a7ef09f766ccebf..d794f011a28332bc96f9e85df16efca920e4f418 100644 (file)
--- a/io_u.c
+++ b/io_u.c
@@ -377,6 +377,12 @@ static unsigned int __get_next_buflen(struct thread_data *td, struct io_u *io_u)
        if (minbs == maxbs)
                return minbs;
 
+       /*
+        * If we can't satisfy the min block size from here, then fail
+        */
+       if (!io_u_fits(td, io_u, minbs))
+               return 0;
+
        if (td->o.use_os_rand)
                rand_max = OS_RAND_MAX;
        else
@@ -1369,7 +1375,8 @@ static void io_completed(struct thread_data *td, struct io_u *io_u,
                        }
                }
 
-               if (ramp_time_over(td) && td->runstate == TD_RUNNING) {
+               if (ramp_time_over(td) && (td->runstate == TD_RUNNING ||
+                                          td->runstate == TD_VERIFYING)) {
                        account_io_completion(td, io_u, icd, idx, bytes);
 
                        if (__should_check_rate(td, idx)) {