[PATCH 07/21] verify: disable header seed check for verify_only jobs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
---
 HOWTO.rst | 5 +++--
 fio.1     | 5 +++--
 init.c    | 3 +++
 3 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/HOWTO.rst b/HOWTO.rst
index a221b9d8..05bdeebb 100644
--- a/HOWTO.rst
+++ b/HOWTO.rst
@@ -3816,8 +3816,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 dd6d9546..1342a23a 100644
--- a/fio.1
+++ b/fio.1
@@ -3542,8 +3542,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 7a1a6840..3d6230cb 100644
--- 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;
 		}
 
 		/*
-- 
2.25.1





[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux