init: write sequence behavior change for verify_only mode
authorAnkit Kumar <ankit.kumar@samsung.com>
Fri, 14 Feb 2025 17:21:00 +0000 (22:51 +0530)
committerVincent Fu <vincentfu@gmail.com>
Thu, 6 Mar 2025 18:58:43 +0000 (13:58 -0500)
Change the behavior for verify_only mode to not disable
verify_write_sequence unless its explicitly enabled.

Update the fio doc. accordingly.

Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
HOWTO.rst
fio.1
init.c

index 62537b6558b2e3a41a181e0d28c607cf66426dc8..d725960ee519e6e067da32a151710c2a352020c9 100644 (file)
--- a/HOWTO.rst
+++ b/HOWTO.rst
@@ -3818,7 +3818,8 @@ Verification
        invocation of this workload. This option allows one to check data multiple
        times at a later date without overwriting it. This option makes sense only
        for workloads that write data, and does not support workloads with the
-       :option:`time_based` option set.
+       :option:`time_based` option set. :option:`verify_write_sequence` will be
+       disabled in this mode, unless its explicitly enabled.
 
 .. option:: do_verify=bool
 
diff --git a/fio.1 b/fio.1
index 1581797a93a37332f875c0d4e53b29c8fe8d41ef..d9412fd96ccd5889b9e4188a133b3d0a61595207 100644 (file)
--- a/fio.1
+++ b/fio.1
@@ -3544,7 +3544,8 @@ Do not perform specified workload, only verify data still matches previous
 invocation of this workload. This option allows one to check data multiple
 times at a later date without overwriting it. This option makes sense only
 for workloads that write data, and does not support workloads with the
-\fBtime_based\fR option set.
+\fBtime_based\fR option set. \fBverify_write_sequence\fR option will be
+disabled in this mode, unless its explicitly enabled.
 .TP
 .BI do_verify \fR=\fPbool
 Run the verify phase after a write phase. Only valid if \fBverify\fR is
diff --git a/init.c b/init.c
index 96a03d984b08b602ec42e1ac987d90bde322b221..dc3e7ed18572eb3d405d618e429975b40ed730c6 100644 (file)
--- a/init.c
+++ b/init.c
@@ -854,8 +854,10 @@ static int fixup_options(struct thread_data *td)
                        o->verify_interval = gcd(o->min_bs[DDIR_WRITE],
                                                        o->max_bs[DDIR_WRITE]);
 
-               if (td->o.verify_only)
-                       o->verify_write_sequence = 0;
+               if (o->verify_only) {
+                       if (!fio_option_is_set(o, verify_write_sequence))
+                               o->verify_write_sequence = 0;
+               }
        }
 
        if (td->o.oatomic) {