Commit cc539da9 authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Changpeng Liu
Browse files

nvme/fio_plugin: Fix the issue that PRACT is not set in NVMe command



If PRACT is enabled, DIF context was not initialized. However it was
expected that PRACT is passed through DIF flags of the DIF context.
Hence PRACT was not set in NVMe command even if user set PRACT.

This patch fixes the issue by passing fio_qpair->io_flags instead
of dif_ctx->dif_flags.

Signed-off-by: default avatarJames Bergsten <jamesx.bergsten@intel.com>
Signed-off-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Signed-off-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ibcb74fc8f74f863d8b53d53484fdea66f4b5db8e
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468016


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJames Bergsten <jrb@thebergstens.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent e97148d5
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -810,10 +810,10 @@ spdk_fio_queue(struct thread_data *td, struct io_u *io_u)
		if (!g_spdk_enable_sgl) {
			rc = spdk_nvme_ns_cmd_read_with_md(ns, fio_qpair->qpair, io_u->buf, md_buf, lba, lba_count,
							   spdk_fio_completion_cb, fio_req,
							   dif_ctx->dif_flags, dif_ctx->apptag_mask, dif_ctx->app_tag);
							   fio_qpair->io_flags, dif_ctx->apptag_mask, dif_ctx->app_tag);
		} else {
			rc = spdk_nvme_ns_cmd_readv_with_md(ns, fio_qpair->qpair, lba,
							    lba_count, spdk_fio_completion_cb, fio_req, dif_ctx->dif_flags,
							    lba_count, spdk_fio_completion_cb, fio_req, fio_qpair->io_flags,
							    spdk_nvme_io_reset_sgl, spdk_nvme_io_next_sge, md_buf,
							    dif_ctx->apptag_mask, dif_ctx->app_tag);
		}
@@ -823,10 +823,10 @@ spdk_fio_queue(struct thread_data *td, struct io_u *io_u)
			rc = spdk_nvme_ns_cmd_write_with_md(ns, fio_qpair->qpair, io_u->buf, md_buf, lba,
							    lba_count,
							    spdk_fio_completion_cb, fio_req,
							    dif_ctx->dif_flags, dif_ctx->apptag_mask, dif_ctx->app_tag);
							    fio_qpair->io_flags, dif_ctx->apptag_mask, dif_ctx->app_tag);
		} else {
			rc = spdk_nvme_ns_cmd_writev_with_md(ns, fio_qpair->qpair, lba,
							     lba_count, spdk_fio_completion_cb, fio_req, dif_ctx->dif_flags,
							     lba_count, spdk_fio_completion_cb, fio_req, fio_qpair->io_flags,
							     spdk_nvme_io_reset_sgl, spdk_nvme_io_next_sge, md_buf,
							     dif_ctx->apptag_mask, dif_ctx->app_tag);
		}