From 9d838d24ad4df6ad5b2953ba6bd24a31a9a897c8 Mon Sep 17 00:00:00 2001 From: yidong0635 Date: Fri, 18 Jan 2019 10:15:03 -0500 Subject: [PATCH] rdma: add return to avoid address points to the zero page Error logs in nvmf_rdma_dump_request lead to report error about address points to the zero page, add judgement to return. this issue occurs in heavy load fio testing. Change-Id: I50302be88b3af53f718e3800aa16df7c506ca4e8 Signed-off-by: yidong0635 Reviewed-on: https://review.gerrithub.io/c/441110 Tested-by: SPDK CI Jenkins Reviewed-by: Ben Walker Reviewed-by: Seth Howell Reviewed-by: Changpeng Liu --- lib/nvmf/rdma.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/nvmf/rdma.c b/lib/nvmf/rdma.c index cd8e7206f..846b546cd 100644 --- a/lib/nvmf/rdma.c +++ b/lib/nvmf/rdma.c @@ -580,8 +580,12 @@ static void nvmf_rdma_dump_request(struct spdk_nvmf_rdma_request *req) { SPDK_ERRLOG("\t\tRequest Data From Pool: %d\n", req->data_from_pool); - SPDK_ERRLOG("\t\tRequest opcode: %d\n", req->req.cmd->nvmf_cmd.opcode); - SPDK_ERRLOG("\t\tRequest recv wr_id%lu\n", req->recv->wr.wr_id); + if (req->req.cmd) { + SPDK_ERRLOG("\t\tRequest opcode: %d\n", req->req.cmd->nvmf_cmd.opcode); + } + if (req->recv) { + SPDK_ERRLOG("\t\tRequest recv wr_id%lu\n", req->recv->wr.wr_id); + } } static void