Skip to contentSkip to conversation

Recent changes (master)

PATCH Jens Axboe 1 participant 1 message Jul 16

lore
Share & tools
lore

Jens Axboe

author
#0 lore raw

The following changes since commit 179fb9c335020ab6993ace93d4c2de7487f05a09:

parse: use signed format specifier for debug print (2026-07-07 16:22:15 -0400)

are available in the Git repository at:

git://git.kernel.dk/fio.git master

for you to fetch changes up to b75f951c8635c0718c4b1b756f649ceb53b68481:

Merge branch 'prv-y-verify-bytes-issued' of https://github.com/malikoyv/fio (2026-07-15 12:41:48 -0400)

----------------------------------------------------------------
Vincent Fu (1):
Merge branch 'prv-y-verify-bytes-issued' of https://github.com/malikoyv/fio

Yehor Malikov (4):
backend: stop experimental verify based on bytes issued, not completed
io_ddir: fix -Wsign-compare in io_ddir_name()
init: disable write sequence checking for experimental_verify
verify: add coverage for experimental replay

 backend.c   |  4 +++-
 fio.h       |  1 +
 init.c      |  4 ++++
 io_ddir.h   |  2 +-
 libfio.c    |  1 +
 t/verify.py | 20 ++++++++++++++------
 6 files changed, 24 insertions(+), 8 deletions(-)

---

Diff of recent changes:

backend.c +3 -1
index 7f41bdfa..35f522e5 100644
@@ -710,7 +710,7 @@ static void do_verify(struct thread_data *td, uint64_t verify_bytes)
 				break;
 			}
 		} else {
-			if (td->bytes_verified + td->o.rw_min_bs > verify_bytes)
+			if (td->verify_bytes_prepped + td->o.rw_min_bs > verify_bytes)
 				break;
 
 			while ((io_u = get_io_u(td)) != NULL) {
@@ -735,6 +735,7 @@ static void do_verify(struct thread_data *td, uint64_t verify_bytes)
 					continue;
 				} else if (io_u->ddir == DDIR_TRIM) {
 					io_u->ddir = DDIR_READ;
+					td->verify_bytes_prepped += io_u->buflen;
 					io_u_set(td, io_u, IO_U_F_TRIMMED);
 					if (td_io_prep(td, io_u)) {
 						put_io_u(td, io_u);
@@ -744,6 +745,7 @@ static void do_verify(struct thread_data *td, uint64_t verify_bytes)
 				} else if (io_u->ddir == DDIR_WRITE) {
 					io_u->ddir = DDIR_READ;
 					io_u->numberio = td->verify_read_issues;
+					td->verify_bytes_prepped += io_u->buflen;
 					td->verify_read_issues++;
 					populate_verify_io_u(td, io_u);
 					if (td_io_prep(td, io_u)) {
fio.h +1 -0
index 494959a6..d96ad4d0 100644
@@ -378,6 +378,7 @@ struct thread_data {
 	uint64_t io_issues[DDIR_RWDIR_CNT];
 	uint64_t verify_read_issues;
 	uint64_t io_issue_bytes[DDIR_RWDIR_CNT];
+	uint64_t verify_bytes_prepped;
 	uint64_t loops;
 
 	/*
init.c +4 -0
index d1bf6bfb..7f332417 100644
@@ -933,6 +933,10 @@ static int fixup_options(struct thread_data *td)
 				o->verify_write_sequence = 0;
 		}
 
+		if (o->experimental_verify && fio_offset_overlap_risk(td) &&
+		    !fio_option_is_set(o, verify_write_sequence))
+			o->verify_write_sequence = 0;
+
 		/*
 		 * Verify header should not be offset beyond the verify
 		 * interval.
io_ddir.h +1 -1
index c2b6266a..e3f8cbf7 100644
@@ -33,7 +33,7 @@ static inline const char *io_ddir_name(enum fio_ddir ddir)
 		[DDIR_WAIT] = "wait",
 	};
 
-	if (ddir >= 0 && ddir < sizeof(name) / sizeof(name[0]) && name[ddir])
+	if (ddir >= 0 && ddir < (int)(sizeof(name) / sizeof(name[0])) && name[ddir])
 		return name[ddir];
 
 	return "invalid";
libfio.c +1 -0
index a57ede4f..37f2c749 100644
@@ -97,6 +97,7 @@ static void reset_io_counters(struct thread_data *td, int all)
 			td->last_usec[ddir] = 0;
 		}
 		td->bytes_verified = 0;
+		td->verify_bytes_prepped = 0;
 	}
 
 	td->zone_bytes = 0;
t/verify.py +14 -6
index 4c3d0a3c..00603c17 100755
@@ -301,6 +301,19 @@ TEST_LIST_HEADER = [
         "test_class": VerifyTest,
         "success": SUCCESS_DEFAULT,
     },
+    {
+        # Basic test using experimental verify replay
+        "test_id": 2004,
+        "fio_opts": {
+            "ioengine": "libaio",
+            "filesize": "1M",
+            "bs": 4096,
+            "experimental_verify": 1,
+            "output-format": "json",
+            },
+        "test_class": VerifyTest,
+        "success": SUCCESS_DEFAULT,
+    },
 ]
 
 #
@@ -541,12 +554,7 @@ def verify_test_header(test_env, args, csum, mode, sequence):
         {sequential, random w/randommap, random w/norandommap, sequence modifiers}
     """
     for test in TEST_LIST_HEADER:
-        # experimental_verify does not work in verify_only=1 mode
-        if "_vo" in mode and 'experimental_verify' in test['fio_opts'] and \
-        test['fio_opts']['experimental_verify']:
-            test['force_skip'] = True
-        else:
-            test['force_skip'] = False
+        test['force_skip'] = False
 
         test['fio_opts']['verify'] = csum
         if csum in ('pattern', 'pattern_hdr'):