From e42f92346eaea0b03db5e61fb2840bdef7f23847 Mon Sep 17 00:00:00 2001 From: yanshuai01 Date: Mon, 27 May 2024 14:03:37 +0800 Subject: [PATCH] fix nvme fio always reporting success --- ...ix-nvme-fio-always-reporting-success.patch | 38 +++++++++++++++++++ spdk.spec | 6 ++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 0029-fix-nvme-fio-always-reporting-success.patch diff --git a/0029-fix-nvme-fio-always-reporting-success.patch b/0029-fix-nvme-fio-always-reporting-success.patch new file mode 100644 index 0000000..295b831 --- /dev/null +++ b/0029-fix-nvme-fio-always-reporting-success.patch @@ -0,0 +1,38 @@ +From 204e6278d4930c6439664fd21018d76784fa9cf7 Mon Sep 17 00:00:00 2001 +From: Monica Kenguva +Date: Thu, 22 Apr 2021 18:21:28 +0000 +Subject: [PATCH] nvme/fio_plugin: fix nvme fio always reporting success + +status code and type is inspected and reported +Fix issue #1893 + +Signed-off-by: Monica Kenguva +Change-Id: I6f181d8c9464182b23c658f4c268b900398fd751 +Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7567 +Reviewed-by: Jim Harris +Reviewed-by: Paul Luse +Reviewed-by: Aleksey Marchuk +Reviewed-by: Shuhei Matsumoto +Tested-by: SPDK CI Jenkins +--- + examples/nvme/fio_plugin/fio_plugin.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/examples/nvme/fio_plugin/fio_plugin.c b/examples/nvme/fio_plugin/fio_plugin.c +index 03a47d3..ccde99d 100644 +--- a/examples/nvme/fio_plugin/fio_plugin.c ++++ b/examples/nvme/fio_plugin/fio_plugin.c +@@ -857,6 +857,10 @@ static void spdk_fio_completion_cb(void *ctx, const struct spdk_nvme_cpl *cpl) + } + } + ++ if (spdk_nvme_cpl_is_error(cpl)) { ++ fio_req->io->error = EIO; ++ } ++ + assert(fio_thread->iocq_count < fio_thread->iocq_size); + fio_thread->iocq[fio_thread->iocq_count++] = fio_req->io; + } +-- +2.27.0 + diff --git a/spdk.spec b/spdk.spec index 2821730..343f6c7 100644 --- a/spdk.spec +++ b/spdk.spec @@ -3,7 +3,7 @@ Name: spdk Version: 21.01.1 -Release: 15 +Release: 16 Summary: Set of libraries and utilities for high performance user-mode storage License: BSD and MIT URL: http://spdk.io @@ -36,6 +36,7 @@ Patch25: 0025-ut-rdma-Fix-GCC-10.2.0-warning.patch Patch26: 0026-lib-nvme-add-mutex-before-submit-admin-request.patch Patch27: 0027--nvme-cuse-Add-ctrlr_lock-for-cuse-register-and-unreg.patch Patch28: 0028-fixed-use-after-free-detected-by-Coverity.patch +Patch29: 0029-fix-nvme-fio-always-reporting-success.patch %define package_version %{version}-%{release} @@ -206,6 +207,9 @@ mv doc/output/html/ %{install_docdir} %changelog +* Mon May 27 2024 yanshuai - 21.01.1-16 +- nvme/fio_plugin: fix nvme fio always reporting success + * Mon May 20 2024 yanshuai - 21.01.1-15 - lib/nvme: fixed use-after-free detected by Coverity -- Gitee