rdma: Check -EINVAL return value of spdk_nvmf_rdma_request_fill_iovs
Return -1 from spdk_nvmf_rdma_request_parse_sgl in the case of -EINVAL since 0 value returned by spdk_nvmf_rdma_request_parse_sgl is treated as no memory case Change-Id: I536592260a3bb658a1a4bc3a79c5b37fbacd3edc Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com> Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com> Signed-off-by: Evgenii Kochetov <evgeniik@mellanox.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470471 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
6ec974ed07
commit
06481fc223
@ -1837,7 +1837,12 @@ spdk_nvmf_rdma_request_parse_sgl(struct spdk_nvmf_rdma_transport *rtransport,
|
||||
req->dif.elba_length = length;
|
||||
}
|
||||
|
||||
if (spdk_nvmf_rdma_request_fill_iovs(rtransport, device, rdma_req, length) < 0) {
|
||||
rc = spdk_nvmf_rdma_request_fill_iovs(rtransport, device, rdma_req, length);
|
||||
if (spdk_unlikely(rc < 0)) {
|
||||
if (rc == -EINVAL) {
|
||||
SPDK_ERRLOG("SGL length exceeds the max I/O size\n");
|
||||
return -1;
|
||||
}
|
||||
/* No available buffers. Queue this request up. */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RDMA, "No available large data buffers. Queueing request %p\n", rdma_req);
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user