[PATCH 03/21] init: write sequence behavior change for verify_only mode

Ankit Kumar <[email protected]>
Newsgroups org.kernel.vger.fio
Message-ID <[email protected]>
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 <[email protected]>
---
 HOWTO.rst | 3 ++-
 fio.1     | 3 ++-
 init.c    | 6 ++++--
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/HOWTO.rst b/HOWTO.rst
index 3f2bde18..c7c131e7 100644
--- a/HOWTO.rst
+++ b/HOWTO.rst
@@ -3816,7 +3816,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 3c5f02b3..88d3be81 100644
--- a/fio.1
+++ b/fio.1
@@ -3542,7 +3542,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 96a03d98..dc3e7ed1 100644
--- 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) {
-- 
2.25.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.