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: James Bergsten <jamesx.bergsten@intel.com>
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ibcb74fc8f74f863d8b53d53484fdea66f4b5db8e
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468016
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: James Bergsten <jrb@thebergstens.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Shuhei Matsumoto 2019-09-11 12:44:25 +09:00 committed by Changpeng Liu
parent e97148d5dd
commit cc539da903

View File

@ -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);
}