Recent changes (master)

Jens Axboe <[email protected]> Thu, 2 Oct 2025 06:00:01 -0600 (MDT)
Newsgroups org.kernel.vger.fio
Message-ID <[email protected]>
The following changes since commit cda225765af700722a1c621aacda2ceb45929e52:

  Merge branch 'master' of https://github.com/kaimeyer-arcserve/fio (2025-09-25 23:06:37 -0600)

are available in the Git repository at:

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

for you to fetch changes up to 97a91b6a69a633d55d8bfa31715fb0434709f223:

  Merge branch 'fix/io_uring-pi-validate' of https://github.com/stanleyzhang9/fio (2025-10-01 15:02:38 -0400)

----------------------------------------------------------------
Stanley Zhang (1):
      engines/io_uring: validate PI on read

Vincent Fu (1):
      Merge branch 'fix/io_uring-pi-validate' of https://github.com/stanleyzhang9/fio

 engines/io_uring.c | 23 +++++++++--------------
 1 file changed, 9 insertions(+), 14 deletions(-)

---

Diff of recent changes:

diff --git a/engines/io_uring.c b/engines/io_uring.c
index 02f80bda..89f44044 100644
--- a/engines/io_uring.c
+++ b/engines/io_uring.c
@@ -686,24 +686,19 @@ static struct io_u *fio_ioring_event(struct thread_data *td, int event)
 	if (cqe->res == io_u->xfer_buflen ||
 	    (io_u->ddir == DDIR_TRIM && !cqe->res)) {
 		io_u->error = 0;
+		if (io_u->ddir == DDIR_READ && o->md_per_io_size && !o->pi_act)
+			fio_ioring_validate_md(td, io_u);
 		return io_u;
 	}
 
-	if (cqe->res != io_u->xfer_buflen) {
-		if (io_u->ddir == DDIR_TRIM) {
-			ld->async_trim_fail = 1;
-			cqe->res = 0;
-		}
-		if (cqe->res > io_u->xfer_buflen)
-			io_u->error = -cqe->res;
-		else
-			io_u->resid = io_u->xfer_buflen - cqe->res;
-
-		return io_u;
+	if (io_u->ddir == DDIR_TRIM) {
+		ld->async_trim_fail = 1;
+		cqe->res = 0;
 	}
-
-	if (o->md_per_io_size)
-		fio_ioring_validate_md(td, io_u);
+	if (cqe->res > io_u->xfer_buflen)
+		io_u->error = -cqe->res;
+	else
+		io_u->resid = io_u->xfer_buflen - cqe->res;
 
 	return io_u;
 }