Skip to contentSkip to conversation

Recent changes (master)

PATCH Jens Axboe 1 participant 1 message Aug 21

lore
Share & tools
lore

Jens Axboe

author
#0 lore raw

The following changes since commit b27fdbac98125f24c7e78ae439245c6989a4a718:

fio: move example job file to examples directory (2026-08-18 12:24:18 -0400)

are available in the Git repository at:

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

for you to fetch changes up to a9f011b10a4b1795c6c340cef24b0b4a441570b5:

t/io_uring_cmd.py: test new bsg features (2026-08-20 18:25:48 +0000)

----------------------------------------------------------------
Jungwon Lee (5):
engines/io_uring: drop unused write_opcode assignment on bsg path engines/io_uring: drop bsg status parsing from event engines/io_uring: add cdb_len option for bsg cmd_type engines/io_uring: support write_mode=verify for bsg cmd_type engines/io_uring: add read_mode=prefetch for bsg cmd_type

Kurt Miller (1):
libnfs only requires gnutls on Linux Modify configure to only require gnutls on Linux when libnfs is >= 6.

Vincent Fu (3):
Merge branch 'gnutls.configure' of https://github.com/bsdkurt/fio
Merge branch 'bsg-update' of https://github.com/ljw8161/fio
t/io_uring_cmd.py: test new bsg features

 HOWTO.rst          |  50 ++++++++++-
 configure          |   4 +-
 engines/bsg.c      | 200 ++++++++++++++++++++++++++++++++++++-----
 engines/bsg.h      |  43 ++++++++-
 engines/io_uring.c | 159 +++++++++++++++++++++++++++++---
 fio.1              |  51 ++++++++++-
 t/io_uring_cmd.py  | 260 +++++++++++++++++++++++++++++++++++++++++++++++++++--
 7 files changed, 715 insertions(+), 52 deletions(-)

---

Diff of recent changes:

HOWTO.rst +49 -1
index 162115d0..410be6d3 100644
@@ -2598,6 +2598,16 @@ with the caveat that when used on the command line, they must come after the
 	Specifies the type of uring passthrough command to be used. Supported
 	values are nvme and bsg. Default is nvme.
 
+.. option:: cdb_len=int : [io_uring_cmd]
+
+	SCSI CDB length used for bsg :option:`cmd_type`. Supported values are
+	0, 10, 16, and 32. Default is 0 (auto): the smallest CDB whose LBA and
+	transfer-length fields fit the request is chosen, escalating from
+	READ(10)/WRITE(10) to READ(16)/WRITE(16) as needed, mirroring the sg
+	engine. Ignored when cmd_type=nvme. When an explicit length is set, a
+	request whose LBA or transfer length exceeds the field capacity of the
+	chosen CDB fails with -EINVAL rather than falling back to a larger CDB.
+
 .. option:: hipri
 
    [io_uring] [io_uring_cmd] [xnvme]
@@ -3079,7 +3089,11 @@ with the caveat that when used on the command line, they must come after the
                         Use Write Zeroes commands for write operations
 
                 **verify**
-                        Use Verify commands for write operations
+                        Use Verify commands for write operations. Supported for
+                        both nvme and bsg cmd_type. For bsg, the SCSI VERIFY(10)/
+                        (16)/(32) opcode is selected by :option:`cdb_len` and the
+                        data comparison behavior by :option:`verify_bytchk`;
+                        :option:`writefua` is not supported in this mode.
 
                 **zone_append**
                         Use zone append commands for write operations. Requires zonemode=zbd
@@ -3090,6 +3104,40 @@ with the caveat that when used on the command line, they must come after the
         entries with no percentage specified.
         Example: ``write/60:zeroes/30:uncor/10`` or ``write/50:zeroes/:uncor/``
 
+.. option:: verify_bytchk=int : [io_uring_cmd]
+
+        BYTCHK field for the SCSI VERIFY command issued when
+        :option:`write_mode` is ``verify`` and :option:`cmd_type` is ``bsg``.
+        Only valid with write_mode=verify. Defaults to 0.
+
+                **0**
+                        Medium verification only; no data is transferred to
+                        the device.
+
+                **1**
+                        The device compares the full transfer against the data
+                        stored on the medium, byte by byte.
+
+                **3**
+                        The device compares a single block against every block
+                        in the range. Only one block is transferred.
+
+.. option:: read_mode=str : [io_uring_cmd]
+
+        Specifies the type of read operation. Only supported with
+        cmd_type=bsg. Defaults to 'read'.
+
+                **read**
+                        Use Read commands for read operations
+
+                **prefetch**
+                        Use SCSI Pre-Fetch commands, which pull the requested
+                        blocks from the medium into the device read cache
+                        without transferring data to the host. Useful for
+                        cache-warming and prefetch-overhead benchmarks. The
+                        Pre-Fetch(10)/(16) opcode is selected by :option:`cdb_len`.
+                        :option:`readfua` is not supported in this mode.
+
 .. option:: verify_mode=str : [io_uring_cmd]
 
         Specifies the type of command to be used in the verification phase.  Defaults to 'read'.
configure +2 -2
index 804db167..2ab83371 100755
@@ -2400,9 +2400,9 @@ if test "$libnfs" != "no" ; then
     libnfs_cflags=$(pkg-config --cflags libnfs)
     libnfs_libs=$(pkg-config --libs libnfs)
 
-    # libnfs >= 6.0.0 requires gnutls for TLS support
+    # libnfs >= 6.0.0 on Linux requires gnutls for TLS support
     libnfs_version=$(pkg-config --modversion libnfs 2>/dev/null)
-    if test -n "$libnfs_version" ; then
+    if test -n "$libnfs_version" -a "$targetos" = "Linux" ; then
       libnfs_major=$(echo $libnfs_version | cut -d. -f1)
       if test "$libnfs_major" -ge 6 ; then
         if $(pkg-config gnutls > /dev/null 2>&1); then
engines/bsg.c +177 -23

251 lines not on this page · raw message

engines/bsg.h +41 -2

66 lines not on this page · raw message

engines/io_uring.c +145 -14

211 lines not on this page · raw message

fio.1 +50 -1

69 lines not on this page · raw message

t/io_uring_cmd.py +251 -9

318 lines not on this page · raw message