verify: warn when verify pass won't be run
authorSitsofe Wheeler <sitsofe@yahoo.com>
Thu, 9 Feb 2017 06:30:04 +0000 (06:30 +0000)
committerSitsofe Wheeler <sitsofe@yahoo.com>
Mon, 14 Aug 2017 02:25:24 +0000 (03:25 +0100)
Put up a warning when the user sets write + verify + runtime +
time_based together because the runtime is completely used by the write
phase but skip the warning if the user is doing verifies "inline" within
the write phase via verify_backlog or they are doing a mixed read/write
workload where the reads might be verifying.

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
init.c

diff --git a/init.c b/init.c
index 5054c54b4b71bbc470ae81eb91c9e6cdf8454229..7fbfa86654d632b4839139352a6075434822839a 100644 (file)
--- a/init.c
+++ b/init.c
@@ -743,6 +743,18 @@ static int fixup_options(struct thread_data *td)
                        ret = warnings_fatal;
                }
 
                        ret = warnings_fatal;
                }
 
+               /*
+                * Warn if verification is requested but no verification of any
+                * kind can be started due to time constraints
+                */
+               if (td_write(td) && o->do_verify && o->timeout &&
+                   o->time_based && !td_read(td) && !o->verify_backlog) {
+                       log_info("fio: verification read phase will never "
+                                "start because write phase uses all of "
+                                "runtime\n");
+                       ret = warnings_fatal;
+               }
+
                if (!fio_option_is_set(o, refill_buffers))
                        o->refill_buffers = 1;
 
                if (!fio_option_is_set(o, refill_buffers))
                        o->refill_buffers = 1;