nvmf/rdma: Add the buffer size check for data_buf_pool
Change-Id: I65e84971f2d55f27b0c0c1a1b226fc4da4b3cf89 Signed-off-by: Ziye Yang <optimistyzy@gmail.com> Reviewed-on: https://review.gerrithub.io/382763 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
eec7e868b3
commit
43727fb7e5
@ -1249,6 +1249,12 @@ spdk_nvmf_rdma_destroy(struct spdk_nvmf_transport *transport)
|
|||||||
free(device);
|
free(device);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (spdk_mempool_count(rtransport->data_buf_pool) != (rtransport->max_queue_depth * 4)) {
|
||||||
|
SPDK_ERRLOG("transport buffer pool count is %zu but should be %u\n",
|
||||||
|
spdk_mempool_count(rtransport->data_buf_pool),
|
||||||
|
rtransport->max_queue_depth * 4);
|
||||||
|
}
|
||||||
|
|
||||||
spdk_mempool_free(rtransport->data_buf_pool);
|
spdk_mempool_free(rtransport->data_buf_pool);
|
||||||
spdk_io_device_unregister(rtransport, NULL);
|
spdk_io_device_unregister(rtransport, NULL);
|
||||||
free(rtransport);
|
free(rtransport);
|
||||||
|
Loading…
Reference in New Issue
Block a user