Skip to contentSkip to conversation

Recent changes (master)

PATCH Jens Axboe 3 participants 3 messages Jun 4, 2024

lore
Share & tools
lore

Jens Axboe

author
#0 lore raw

The following changes since commit 93dc85482a998440f8e40814014da8cbfe9cf5e8:

Merge branch 'fix-coverity-scan-defect' of https://github.com/parkvibes/fio (2024-05-31 09:46:59 -0400)

are available in the Git repository at:

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

for you to fetch changes up to 1757469a81cac5bd662b9cde26f1e5d4f0402181:

Merge branch 'io_uring_cmd/support-write-family' of https://github.com/samsungds/fio (2024-06-03 10:17:38 -0400)

----------------------------------------------------------------
Minwoo Im (1):
io_uring: Add 'write_mode' option for optional cmds

Vincent Fu (1):
Merge branch 'io_uring_cmd/support-write-family' of https://github.com/samsungds/fio

 HOWTO.rst          | 16 ++++++++++++++
 engines/io_uring.c | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
 engines/nvme.c     |  4 ++--
 engines/nvme.h     |  5 ++++-
 fio.1              | 20 +++++++++++++++++
 5 files changed, 105 insertions(+), 4 deletions(-)

---

Diff of recent changes:

HOWTO.rst +16 -0
index 0b39a892..33a6ad93 100644
@@ -2857,6 +2857,22 @@ with the caveat that when used on the command line, they must come after the
 	With writefua option set to 1, write operations include
 	the force unit access (fua) flag. Default is 0.
 
+.. option:: write_mode=str : [io_uring_cmd]
+
+        Specifies the type of write operation.  Defaults to 'write'.
+
+                **write**
+                        Use Write commands for write operations
+
+                **uncor**
+                        Use Write Uncorrectable commands for write opreations
+
+                **zeroes**
+                        Use Write Zeroes commands for write operations
+
+                **verify**
+                        Use Verify commands for write operations
+
 .. option:: sg_write_mode=str : [sg]
 
 	Specify the type of write commands to issue. This option can take ten values:
engines/io_uring.c +63 -1

106 lines not on this page · raw message

engines/nvme.c +2 -2
index 7b73c806..72934c8b 100644
@@ -363,7 +363,7 @@ void fio_nvme_uring_cmd_trim_prep(struct nvme_uring_cmd *cmd, struct io_u *io_u,
 
 int fio_nvme_uring_cmd_prep(struct nvme_uring_cmd *cmd, struct io_u *io_u,
 			    struct iovec *iov, struct nvme_dsm *dsm,
-			    unsigned int cdw12_flags)
+			    uint8_t write_opcode, unsigned int cdw12_flags)
 {
 	struct nvme_data *data = FILE_ENG_DATA(io_u->file);
 	__u64 slba;
@@ -376,7 +376,7 @@ int fio_nvme_uring_cmd_prep(struct nvme_uring_cmd *cmd, struct io_u *io_u,
 		cmd->opcode = nvme_cmd_read;
 		break;
 	case DDIR_WRITE:
-		cmd->opcode = nvme_cmd_write;
+		cmd->opcode = write_opcode;
 		break;
 	case DDIR_TRIM:
 		fio_nvme_uring_cmd_trim_prep(cmd, io_u, dsm);
engines/nvme.h +4 -1
index 2db9eb86..bc2370b8 100644
@@ -75,7 +75,10 @@ enum nvme_admin_opcode {
 enum nvme_io_opcode {
 	nvme_cmd_write			= 0x01,
 	nvme_cmd_read			= 0x02,
+	nvme_cmd_write_uncor		= 0x04,
+	nvme_cmd_write_zeroes		= 0x08,
 	nvme_cmd_dsm			= 0x09,
+	nvme_cmd_verify			= 0x0c,
 	nvme_cmd_io_mgmt_recv		= 0x12,
 	nvme_zns_cmd_mgmt_send		= 0x79,
 	nvme_zns_cmd_mgmt_recv		= 0x7a,
@@ -427,7 +430,7 @@ int fio_nvme_get_info(struct fio_file *f, __u64 *nlba, __u32 pi_act,
 
 int fio_nvme_uring_cmd_prep(struct nvme_uring_cmd *cmd, struct io_u *io_u,
 			    struct iovec *iov, struct nvme_dsm *dsm,
-			    unsigned int cdw12_flags);
+			    uint8_t write_opcode, unsigned int cdw12_flags);
 
 void fio_nvme_pi_fill(struct nvme_uring_cmd *cmd, struct io_u *io_u,
 		      struct nvme_cmd_ext_io_opts *opts);
fio.1 +20 -0
index 9a965cb0..2649529b 100644
@@ -2640,6 +2640,26 @@ unit access (fua) flag. Default: 0.
 With writefua option set to 1, write operations include the force
 unit access (fua) flag. Default: 0.
 .TP
+.BI (io_uring_cmd)write_mode \fR=\fPstr
+Specifies the type of write operation.  Defaults to 'write'.
+.RS
+.RS
+.TP
+.B write
+Use Write commands for write operations
+.TP
+.B uncor
+Use Write Uncorrectable commands for write opreations
+.TP
+.B zeroes
+Use Write Zeroes commands for write operations
+.TP
+.B verify
+Use Verify commands for write operations
+.TP
+.RE
+.RE
+.TP
 .BI (sg)sg_write_mode \fR=\fPstr
 Specify the type of write commands to issue. This option can take multiple
 values:
#1 lore raw
Quoted 37 lines · Jens Axboe

The following changes since commit 93dc85482a998440f8e40814014da8cbfe9cf5e8:

Merge branch 'fix-coverity-scan-defect' of https://github.com/parkvibes/fio (2024-05-31 09:46:59 -0400)

are available in the Git repository at:

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

for you to fetch changes up to 1757469a81cac5bd662b9cde26f1e5d4f0402181:

Merge branch 'io_uring_cmd/support-write-family' of https://github.com/samsungds/fio (2024-06-03 10:17:38 -0400)

----------------------------------------------------------------
Minwoo Im (1):
io_uring: Add 'write_mode' option for optional cmds

Vincent Fu (1):
Merge branch 'io_uring_cmd/support-write-family' of https://github.com/samsungds/fio

 HOWTO.rst          | 16 ++++++++++++++
 engines/io_uring.c | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
 engines/nvme.c     |  4 ++--
 engines/nvme.h     |  5 ++++-
 fio.1              | 20 +++++++++++++++++
 5 files changed, 105 insertions(+), 4 deletions(-)

---

Diff of recent changes:

HOWTO.rst +0 -0
index 0b39a892..33a6ad93 100644
@@ -2857,6 +2857,22 @@ with the caveat that when used on the command line, they must come after the
 	With writefua option set to 1, write operations include
 	the force unit access (fua) flag. Default is 0.

HOWTO.rst with the caveat that when used on the command line, they must come after the · line 2868

Quoted 10 lines
HOWTO.rst +9 -0
 
+.. option:: write_mode=str : [io_uring_cmd]
+
+        Specifies the type of write operation.  Defaults to 'write'.
+
+                **write**
+                        Use Write commands for write operations
+
+                **uncor**
+                        Use Write Uncorrectable commands for write opreations

FWIW: s/opreations/operations/

Quoted 8 lines
fio.1 +0 -0
index 9a965cb0..2649529b 100644
@@ -2640,6 +2640,26 @@ unit access (fua) flag. Default: 0.
 With writefua option set to 1, write operations include the force
 unit access (fua) flag. Default: 0.
 .TP

fio.1 unit access (fua) flag. Default: 0. · line 2652

Quoted 10 lines
fio.1 +10 -0
+.BI (io_uring_cmd)write_mode \fR=\fPstr
+Specifies the type of write operation.  Defaults to 'write'.
+.RS
+.RS
+.TP
+.B write
+Use Write commands for write operations
+.TP
+.B uncor
+Use Write Uncorrectable commands for write opreations

FWIW: s/opreations/operations/

Kind regards,
Niklas

#2 lore raw
Quoted 75 lines · Niklas Cassel
Quoted 37 lines · Jens Axboe

The following changes since commit 93dc85482a998440f8e40814014da8cbfe9cf5e8:

   Merge branch 'fix-coverity-scan-defect' of https://github.com/parkvibes/fio (2024-05-31 09:46:59 -0400)

are available in the Git repository at:

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

for you to fetch changes up to 1757469a81cac5bd662b9cde26f1e5d4f0402181:

   Merge branch 'io_uring_cmd/support-write-family' of https://github.com/samsungds/fio (2024-06-03 10:17:38 -0400)

----------------------------------------------------------------
Minwoo Im (1):
io_uring: Add 'write_mode' option for optional cmds

Vincent Fu (1):
Merge branch 'io_uring_cmd/support-write-family' of https://github.com/samsungds/fio

  HOWTO.rst          | 16 ++++++++++++++
  engines/io_uring.c | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
  engines/nvme.c     |  4 ++--
  engines/nvme.h     |  5 ++++-
  fio.1              | 20 +++++++++++++++++
  5 files changed, 105 insertions(+), 4 deletions(-)

---

Diff of recent changes:

HOWTO.rst +0 -0
index 0b39a892..33a6ad93 100644
@@ -2857,6 +2857,22 @@ with the caveat that when used on the command line, they must come after the
  	With writefua option set to 1, write operations include
  	the force unit access (fua) flag. Default is 0.

HOWTO.rst with the caveat that when used on the command line, they must come after the · line 2868

Quoted 10 lines
HOWTO.rst +9 -0
 
+.. option:: write_mode=str : [io_uring_cmd]
+
+        Specifies the type of write operation.  Defaults to 'write'.
+
+                **write**
+                        Use Write commands for write operations
+
+                **uncor**
+                        Use Write Uncorrectable commands for write opreations

FWIW: s/opreations/operations/

Quoted 8 lines
fio.1 +0 -0
index 9a965cb0..2649529b 100644
@@ -2640,6 +2640,26 @@ unit access (fua) flag. Default: 0.
  With writefua option set to 1, write operations include the force
  unit access (fua) flag. Default: 0.
  .TP

fio.1 unit access (fua) flag. Default: 0. · line 2652

Quoted 10 lines
fio.1 +10 -0
+.BI (io_uring_cmd)write_mode \fR=\fPstr
+Specifies the type of write operation.  Defaults to 'write'.
+.RS
+.RS
+.TP
+.B write
+Use Write commands for write operations
+.TP
+.B uncor
+Use Write Uncorrectable commands for write opreations

FWIW: s/opreations/operations/

Quoted 3 lines

Kind regards,
Niklas

Fixed. Thanks.

Vincent