verify: disable header seed check for verify_only jobs
authorAnkit Kumar <ankit.kumar@samsung.com>
Fri, 14 Feb 2025 18:08:03 +0000 (23:38 +0530)
committerVincent Fu <vincentfu@gmail.com>
Thu, 6 Mar 2025 18:58:43 +0000 (13:58 -0500)
For the invoked verify_only job, header seed can match only if it
exactly matches the original write job. This means either randrepeat
should be true, or we must use the same randseed which was used with the
original write job. After write the verify_only workload shouldn't be
changed from sequential to random or vice versa.

Considering these constraints disable verify_header_seed for verify_only
jobs. Users will still be able to enable header seed checking if they
explicitly set the verify_header_sequence option.

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

index 5ebaceb08685eee73c97af5735566090d56bf9d5..a0174318be25b098b715ea9febf52b73732a20b5 100644 (file)
--- a/HOWTO.rst
+++ b/HOWTO.rst
@@ -3818,8 +3818,9 @@ 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:`verify_write_sequence` will be
-       disabled in this mode, unless its explicitly enabled.
+       :option:`time_based` option set. :option:`verify_write_sequence` and
+       :option:`verify_header_seed` will be disabled in this mode, unless they are
+       explicitly enabled.
 
 .. option:: do_verify=bool
 
diff --git a/fio.1 b/fio.1
index 03078c3acf13e7cacef45ac048fe0a9f5d69ef11..2f45390481433d76f1eb0d8f47b4fa317bafdf73 100644 (file)
--- a/fio.1
+++ b/fio.1
@@ -3544,8 +3544,9 @@ 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. \fBverify_write_sequence\fR option will be
-disabled in this mode, unless its explicitly enabled.
+\fBtime_based\fR option set. Options \fBverify_write_sequence\fR and
+\fBverify_header_seed\fR will be disabled in this mode, unless they are
+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 7a1a6840f044f75c78663d91439def5b0fd7e503..3d6230cb6b1e3304e1212385dfb57846df9883b1 100644 (file)
--- a/init.c
+++ b/init.c
@@ -857,6 +857,9 @@ static int fixup_options(struct thread_data *td)
                if (o->verify_only) {
                        if (!fio_option_is_set(o, verify_write_sequence))
                                o->verify_write_sequence = 0;
+
+                       if (!fio_option_is_set(o, verify_header_seed))
+                               o->verify_header_seed = 0;
                }
 
                /*