Recent changes (master)
The following changes since commit 86fc77aa2745882398619cf4d5b5b2d208f69ec4:
ci: always update apt cache before installing pkgs (2024-10-15 11:29:18 -0400)
are available in the Git repository at:
git://git.kernel.dk/fio.git master
for you to fetch changes up to a191635ad42893a60d0a917b27e97e3fc73f7fee:
engines/io_uring_cmd: do not send data buffer for write zeroes (2024-10-28 12:25:15 -0400)
----------------------------------------------------------------
Vincent Fu (2):
engines/io_uring_cmd: add option to set DEAC bit for write zeroes engines/io_uring_cmd: do not send data buffer for write zeroes
engines/io_uring.c | 13 +++++++++++++ engines/nvme.c | 6 +++++- 2 files changed, 18 insertions(+), 1 deletion(-)
---
Diff of recent changes:
engines/io_uring.c +13 -0
@@ -104,6 +104,7 @@ struct ioring_options {unsigned int hipri;unsigned int readfua;unsigned int writefua; +unsigned int deac;unsigned int write_mode;unsigned int verify_mode;struct cmdprio_options cmdprio_options;
@@ -357,6 +358,16 @@ static struct fio_option options[] = { .category = FIO_OPT_C_ENGINE, .group = FIO_OPT_G_IOURING, }, + { + .name = "deac", + .lname = "Deallocate bit for write zeroes command", + .type = FIO_OPT_BOOL, + .off1 = offsetof(struct ioring_options, deac), + .help = "Set DEAC (deallocate) flag for write zeroes command", + .def = "0", + .category = FIO_OPT_C_ENGINE, + .group = FIO_OPT_G_IOURING, + }, { .name = NULL, },
@@ -1388,6 +1399,8 @@ static int fio_ioring_init(struct thread_data *td)break ;case FIO_URING_CMD_WMODE_ZEROES : ld->write_opcode = nvme_cmd_write_zeroes; +if (o->deac) + ld->cdw12_flags[DDIR_WRITE ] =1 <<25 ;break ;case FIO_URING_CMD_WMODE_VERIFY : ld->write_opcode = nvme_cmd_verify;
engines/nvme.c +5 -1
@@ -406,7 +406,11 @@ 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 { - cmd->addr = (__u64 )(uintptr_t )io_u->xfer_buf; +/* no buffer for write zeroes */ +if (cmd->opcode != nvme_cmd_write_zeroes) + cmd->addr = (__u64 )(uintptr_t )io_u->xfer_buf; +else + cmd->addr = (__u64 )(uintptr_t )NULL ; cmd->data_len = io_u->xfer_buflen; }if (data->lba_shift && data->ms) {