summaryrefslogtreecommitdiff
path: root/net/sunrpc
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2023-12-04 17:58:20 +0300
committerChuck Lever <chuck.lever@oracle.com>2024-01-08 01:54:31 +0300
commitefd02cb0dda6fed89065bb9d6de77d9752e1f0c3 (patch)
treeb0c674ce25a2c7295598c53b7297515a7ead2cb8 /net/sunrpc
parent23bab3b22d84793f1f096322d17952156be6f207 (diff)
downloadlinux-efd02cb0dda6fed89065bb9d6de77d9752e1f0c3.tar.xz
svcrdma: Update the synopsis of svc_rdma_read_special()
Since the RDMA Read I/O state is now contained in the recv_ctxt, svc_rdma_read_special() can use that recv_ctxt to derive the read_info rather than the other way around. This removes another usage of the ri_readctxt field, enabling its removal in a subsequent patch. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/xprtrdma/svc_rdma_rw.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma_rw.c b/net/sunrpc/xprtrdma/svc_rdma_rw.c
index f9d1b0463282..a3003c2dc0a2 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_rw.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_rw.c
@@ -1054,8 +1054,8 @@ static int svc_rdma_read_call_chunk(struct svc_rqst *rqstp,
/**
* svc_rdma_read_special - Build RDMA Read WQEs to pull a Long Message
- * @rdma: controlling transport
- * @info: context for RDMA Reads
+ * @rqstp: RPC transaction context
+ * @head: context for ongoing I/O
*
* The start of the data lands in the first page just after the
* Transport header, and the rest lands in rqstp->rq_arg.pages.
@@ -1071,23 +1071,22 @@ static int svc_rdma_read_call_chunk(struct svc_rqst *rqstp,
* %-ENOTCONN: posting failed (connection is lost),
* %-EIO: rdma_rw initialization failed (DMA mapping, etc).
*/
-static noinline int svc_rdma_read_special(struct svcxprt_rdma *rdma,
- struct svc_rdma_read_info *info)
+static noinline int svc_rdma_read_special(struct svc_rqst *rqstp,
+ struct svc_rdma_recv_ctxt *head)
{
- struct svc_rdma_recv_ctxt *head = info->ri_readctxt;
- struct xdr_buf *buf = &info->ri_rqst->rq_arg;
+ struct xdr_buf *buf = &rqstp->rq_arg;
int ret;
- ret = svc_rdma_read_call_chunk(info->ri_rqst, info->ri_readctxt);
+ ret = svc_rdma_read_call_chunk(rqstp, head);
if (ret < 0)
goto out;
buf->len += head->rc_readbytes;
buf->buflen += head->rc_readbytes;
- buf->head[0].iov_base = page_address(info->ri_rqst->rq_pages[0]);
+ buf->head[0].iov_base = page_address(rqstp->rq_pages[0]);
buf->head[0].iov_len = min_t(size_t, PAGE_SIZE, head->rc_readbytes);
- buf->pages = &info->ri_rqst->rq_pages[1];
+ buf->pages = &rqstp->rq_pages[1];
buf->page_len = head->rc_readbytes - buf->head[0].iov_len;
out:
@@ -1142,7 +1141,7 @@ int svc_rdma_process_read_list(struct svcxprt_rdma *rdma,
else
ret = svc_rdma_read_multiple_chunks(rqstp, head);
} else
- ret = svc_rdma_read_special(rdma, info);
+ ret = svc_rdma_read_special(rqstp, head);
if (ret < 0)
goto out_err;