Skip to contentSkip to conversation

Recent changes (master)

PATCH Jens Axboe 1 participant 1 message Apr 18

lore
Share & tools
lore

Jens Axboe

author
#0 lore raw

The following changes since commit 219f1c3503c1961f41173456d399f41b72d08ef3:

Merge branch 'arm-select-eintr' of https://github.com/alex310110/fio (2026-04-16 10:56:35 -0600)

are available in the Git repository at:

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

for you to fetch changes up to d91ab4439af20b13dbbe55021f6c29de5b6eddeb:

Merge branch 'check-numberio-read-only' of https://github.com/minwooim/fio (2026-04-16 22:31:44 -0400)

----------------------------------------------------------------
Minwoo Im (6):
fio.h: treat io_size > size as offset overlap risk Revert "backend: fix verify issue during readwrite"
backend: update total_bytes for TD_DDIR_WRITE
io_u: check wrap around f->last_pos for overlapped case
libfio: reset nr_done_files when io_size > size t/numberio_overlap: add overlap write verification tests

Vincent Fu (1):
Merge branch 'check-numberio-read-only' of https://github.com/minwooim/fio

 backend.c               |   7 +-
 ci/actions-full-test.sh |   5 +
 fio.h                   |   3 +-
 io_u.c                  |   5 +-
 libfio.c                |   3 +-
 t/numberio_overlap.py   | 842 ++++++++++++++++++++++++++++++++++++++++++++++++
 t/run-fio-tests.py      |   8 +
 7 files changed, 865 insertions(+), 8 deletions(-)
 create mode 100755 t/numberio_overlap.py

---

Diff of recent changes:

backend.c +2 -5
index 230d7fd0..cad43ace 100644
@@ -1104,11 +1104,8 @@ static void do_io(struct thread_data *td, uint64_t *bytes_done)
 	if (td_write(td) && td_random(td) && td->o.norandommap)
 		total_bytes = max(total_bytes, (uint64_t) td->o.io_size);
 
-	/*
-	 * Don't break too early if io_size > size. The exception is when
-	 * verify is enabled.
-	 */
-	if (td_rw(td) && !td_random(td) && td->o.verify == VERIFY_NONE)
+	/* Don't break too early if io_size > size */
+	if (td_write(td) && !td_random(td))
 		total_bytes = max(total_bytes, (uint64_t)td->o.io_size);
 
 	/*
ci/actions-full-test.sh +5 -0
index 5d6d1ca3..14c2fcf7 100755
@@ -32,6 +32,11 @@ main() {
 	    -p
             "1010:--skip 15 16 17 18 19 20 21 22"
         )
+	# io_uring is unavailable in containers; use psync and libaio instead
+	args+=(
+	    -p
+	    "1021:--ioengines psync,libaio"
+	)
 
     fi
 
fio.h +2 -1
index 8708f048..7793d35c 100644
@@ -827,7 +827,8 @@ extern void clear_inflight(struct thread_data *);
 static inline bool fio_offset_overlap_risk(struct thread_data *td)
 {
 	if (td->o.norandommap || td->o.softrandommap ||
-	    td->o.ddir_seq_add || (td->o.ddir_seq_nr > 1))
+	    td->o.ddir_seq_add || (td->o.ddir_seq_nr > 1) ||
+	    td->o.io_size > td->o.size)
 		return true;
 
 	return false;
io_u.c +4 -1
index 756aa090..24d8b7de 100644
@@ -382,8 +382,11 @@ static int get_next_seq_offset(struct thread_data *td, struct fio_file *f,
 	/*
 	 * If we reach the end for a rw-io-size based run, reset us back to 0
 	 * and invalidate the cache, if we need to.
+	 *
+	 * If it has possibility of overlapped offsets (io_size > size), we
+	 * should get back to 0 offset to verify overlapped offsets.
 	 */
-	if (td_rw(td) && o->io_size > o->size) {
+	if (td_write(td) && o->io_size > o->size) {
 		if (f->last_pos[ddir] >= f->io_size + get_start_offset(td, f)) {
 			f->last_pos[ddir] = f->file_offset;
 			loop_cache_invalidate(td, f);
libfio.c +2 -1
index 52afeafb..a57ede4f 100644
@@ -106,7 +106,8 @@ static void reset_io_counters(struct thread_data *td, int all)
 	/*
 	 * reset file done count if we are to start over
 	 */
-	if (td->o.time_based || td->loops > 1 || td->o.do_verify)
+	if (td->o.time_based || td->loops > 1 || td->o.do_verify ||
+			(td->o.io_size > td->o.size))
 		td->nr_done_files = 0;
 }
 
t/numberio_overlap.py new file +842 -0

842 lines not on this page · raw message

t/run-fio-tests.py +8 -0
index b3321312..c3545dd6 100755
@@ -1139,6 +1139,14 @@ TEST_LIST = [
         'success':          SUCCESS_DEFAULT,
         'requirements':     [Requirements.not_windows],
     },
+    {
+        'test_id':          1021,
+        'test_class':       FioExeTest,
+        'exe':              't/numberio_overlap.py',
+        'parameters':       ['-f', '{fio_path}'],
+        'success':          SUCCESS_DEFAULT,
+        'requirements':     [],
+    },
 ]