[PATCH 05/21] verify: disable header seed checking instead of overwriting it

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

 



The existing header seed is overwritten if zone reset frequency is set or
if verify backlog is enabled. Disable verify header seed check for these
scenarios, unless there is an explicit request to enable it.

Note: There is no fio behavior change intended by this patch.

Signed-off-by: Ankit Kumar <ankit.kumar@xxxxxxxxxxx>
---
 init.c   | 11 +++++++++++
 verify.c |  8 --------
 2 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/init.c b/init.c
index dc3e7ed1..99661ca8 100644
--- a/init.c
+++ b/init.c
@@ -858,6 +858,17 @@ static int fixup_options(struct thread_data *td)
 			if (!fio_option_is_set(o, verify_write_sequence))
 				o->verify_write_sequence = 0;
 		}
+
+		/*
+		 * Disable rand_seed check when we have verify_backlog, or
+		 * zone reset frequency for zonemode=zbd.
+		 * Unless we were explicitly asked to enable it.
+		 */
+		if (!td_rw(td) || (td->flags & TD_F_VER_BACKLOG) ||
+		    o->zrf.u.f) {
+			if (!fio_option_is_set(o, verify_header_seed))
+				o->verify_header_seed = 0;
+		}
 	}
 
 	if (td->o.oatomic) {
diff --git a/verify.c b/verify.c
index 49d44982..928bdd54 100644
--- a/verify.c
+++ b/verify.c
@@ -934,14 +934,6 @@ int verify_io_u(struct thread_data *td, struct io_u **io_u_ptr)
 			memswp(p, p + td->o.verify_offset, header_size);
 		hdr = p;
 
-		/*
-		 * Make rand_seed check pass when have verify_backlog or
-		 * zone reset frequency for zonemode=zbd.
-		 */
-		if (!td_rw(td) || (td->flags & TD_F_VER_BACKLOG) ||
-		    td->o.zrf.u.f)
-			io_u->rand_seed = hdr->rand_seed;
-
 		if (td->o.verify != VERIFY_PATTERN_NO_HDR) {
 			ret = verify_header(io_u, td, hdr, hdr_num, hdr_inc);
 			if (ret)
-- 
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