Skip to contentSkip to conversation

Recent changes (master)

PATCH Jens Axboe 1 participant 1 message Jun 2

lore
Share & tools
lore

Jens Axboe

author
#0 lore raw

The following changes since commit 6a66cccb6cb2b321e107b97733faac4db4d95ebc:

Merge branch 'fix-musl-prctl-conflict' of https://github.com/lucashecht/fio (2026-05-28 10:30:47 -0400)

are available in the Git repository at:

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

for you to fetch changes up to e682f9b3406e35a28a87f39789e3a0c6138b30b4:

ci: add nvmept_write_mode.py to test harness (2026-06-01 14:38:22 -0400)

----------------------------------------------------------------
Swarna Prabhu (1):
engines/nvme: fix addr/data_len for no data nvme commands

Vincent Fu (3):
Merge branch 'fio_5_27' of https://github.com/swarnagh6/fio
t/nvmept_write_mode.py: test script for io_uring_cmd write modes
ci: add nvmept_write_mode.py to test harness

 .github/workflows/qemu.yml |   2 +-
 engines/nvme.c             |  20 +++-
 t/nvmept_write_mode.py     | 282 +++++++++++++++++++++++++++++++++++++++++++++
 t/run-fio-tests.py         |   8 ++
 4 files changed, 306 insertions(+), 6 deletions(-)
 create mode 100755 t/nvmept_write_mode.py

---

Diff of recent changes:

.github/workflows/qemu.yml +1 -1
index 8160d43e..ba0a00ac 100644
@@ -18,7 +18,7 @@ jobs:
               -device nvme,id=nvme0,serial=deadbeef
               -drive id=nvm-0,file=nvme0.img,format=raw,if=none,discard=unmap,media=disk
               -device nvme-ns,id=nvm-0,drive=nvm-0,bus=nvme0,nsid=1
-            test_cmd: "python3 t/run-fio-tests.py --nvmecdev /dev/ng0n1 --run-only 1014 1015"
+            test_cmd: "python3 t/run-fio-tests.py --nvmecdev /dev/ng0n1 --run-only 1014 1015 1022 -p '1022:--skip 30 31 32 33 34'"
             extra_pkgs: "nvme-cli"
           - config: 16-bit Guard PI tests (long)
             device: >-
engines/nvme.c +15 -5
index 528b2a29..e480fce0 100644
@@ -390,12 +390,22 @@ int fio_nvme_uring_cmd_prep(struct nvme_uring_cmd *cmd, struct io_u *io_u,
 		cmd->addr = (__u64)(uintptr_t)iov;
 		cmd->data_len = 1;
 	} else {
-		/* no buffer for write zeroes */
-		if (cmd->opcode != nvme_cmd_write_zeroes)
+		/* use buffer only for data transfer commands */
+		switch (cmd->opcode) {
+		case nvme_cmd_read:
+		case nvme_cmd_write:
+		case nvme_cmd_compare:
 			cmd->addr = (__u64)(uintptr_t)io_u->xfer_buf;
-		else
-			cmd->addr = (__u64)(uintptr_t)NULL;
-		cmd->data_len = io_u->xfer_buflen;
+			cmd->data_len = io_u->xfer_buflen;
+			break;
+		case nvme_cmd_write_zeroes:
+		case nvme_cmd_write_uncor:
+		case nvme_cmd_verify:
+			/* since cmd->addr and cmd->data_len is set to 0 by memset */
+			break;
+		default:
+			return -ENOTSUP;
+		}
 	}
 	if (data->lba_shift && data->ms) {
 		cmd->metadata = (__u64)(uintptr_t)io_u->mmap_data;
t/nvmept_write_mode.py new file +282 -0

282 lines not on this page · raw message

t/run-fio-tests.py +8 -0
index c3545dd6..afecd67d 100755
@@ -1147,6 +1147,14 @@ TEST_LIST = [
         'success':          SUCCESS_DEFAULT,
         'requirements':     [],
     },
+    {
+        'test_id':          1022,
+        'test_class':       FioExeTest,
+        'exe':              't/nvmept_write_mode.py',
+        'parameters':       ['-f', '{fio_path}', '--dut', '{nvmecdev}'],
+        'success':          SUCCESS_DEFAULT,
+        'requirements':     [Requirements.linux, Requirements.nvmecdev],
+    },
 ]