Adds verify_only option
[fio.git] / verify.c
index f592c55c509e6e811417bf73b654b9dfae8adce5..371b650a50a327f383672fb41bb332adaa3e7bde 100644 (file)
--- a/verify.c
+++ b/verify.c
@@ -387,10 +387,14 @@ static int verify_io_u_meta(struct verify_header *hdr, struct vcont *vc)
         * For read-only workloads, the program cannot be certain of the
         * last numberio written to a block. Checking of numberio will be done
         * only for workloads that write data.
+        * For verify_only, numberio will be checked in the last iteration when
+        * the correct state of numberio, that would have been written to each
+        * block in a previous run of fio, has been reached.
         */
        if (td_write(td) || td_rw(td))
-               if (vh->numberio != io_u->numberio)
-                       ret = EILSEQ;
+               if (!td->o.verify_only || td->o.loops == 0)
+                       if (vh->numberio != io_u->numberio)
+                               ret = EILSEQ;
 
        if (!ret)
                return 0;