From ffeb02e5f1b9de5ed16d4706a1eeeca4238a32b8 Mon Sep 17 00:00:00 2001 From: yanshuai01 Date: Mon, 27 May 2024 14:03:37 +0800 Subject: [PATCH] fix check for pool capacity --- 0029-fix-check-for-pool-capacity.patch | 41 ++++++++++++++++++++++++++ spdk.spec | 6 +++- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 0029-fix-check-for-pool-capacity.patch diff --git a/0029-fix-check-for-pool-capacity.patch b/0029-fix-check-for-pool-capacity.patch new file mode 100644 index 0000000..a61ae58 --- /dev/null +++ b/0029-fix-check-for-pool-capacity.patch @@ -0,0 +1,41 @@ +From de447dcd9225b10427794ea53e8855e20567c571 Mon Sep 17 00:00:00 2001 +From: Alexey Marchuk +Date: Tue, 21 May 2024 18:03:19 +0200 +Subject: [PATCH] nvmf/rdma: Fix check for pool capacity + +Data WR pool can be configured and default value was changed, +but check for the pool capacity was not updated and as result +a wrong error message is printed + +Signed-off-by: Alexey Marchuk +Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/23280 (master) + +(cherry picked from commit ab2395bb04f65945696a06642e3df74745b3521b) +Change-Id: Ib50664ff972a20fac6e6f718132b80707b9f6d6b +Signed-off-by: Marek Chomnicki +Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/23322 +Reviewed-by: Konrad Sztyber +Reviewed-by: Aleksey Marchuk +Tested-by: SPDK CI Jenkins + +--- + lib/nvmf/rdma.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/lib/nvmf/rdma.c b/lib/nvmf/rdma.c +index ab538f7..5357b53 100644 +--- a/lib/nvmf/rdma.c ++++ b/lib/nvmf/rdma.c +@@ -2506,8 +2506,7 @@ nvmf_rdma_destroy(struct spdk_nvmf_transport *transport, + } + + if (rtransport->data_wr_pool != NULL) { +- if (spdk_mempool_count(rtransport->data_wr_pool) != +- (transport->opts.max_queue_depth * SPDK_NVMF_MAX_SGL_ENTRIES)) { ++ if (spdk_mempool_count(rtransport->data_wr_pool) != transport->opts.data_wr_pool_size) { + SPDK_ERRLOG("transport wr pool count is %zu but should be %u\n", + spdk_mempool_count(rtransport->data_wr_pool), + transport->opts.max_queue_depth * SPDK_NVMF_MAX_SGL_ENTRIES); +-- +2.27.0 + diff --git a/spdk.spec b/spdk.spec index 2821730..b1be326 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-check-for-pool-capacity.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 +- nvmf/rdma: Fix check for pool capacity + * Mon May 20 2024 yanshuai - 21.01.1-15 - lib/nvme: fixed use-after-free detected by Coverity -- Gitee