Skip to content

Commit efd02cb

Browse files
committed
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>
1 parent 23bab3b commit efd02cb

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

net/sunrpc/xprtrdma/svc_rdma_rw.c

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1054,8 +1054,8 @@ static int svc_rdma_read_call_chunk(struct svc_rqst *rqstp,
10541054

10551055
/**
10561056
* svc_rdma_read_special - Build RDMA Read WQEs to pull a Long Message
1057-
* @rdma: controlling transport
1058-
* @info: context for RDMA Reads
1057+
* @rqstp: RPC transaction context
1058+
* @head: context for ongoing I/O
10591059
*
10601060
* The start of the data lands in the first page just after the
10611061
* 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,
10711071
* %-ENOTCONN: posting failed (connection is lost),
10721072
* %-EIO: rdma_rw initialization failed (DMA mapping, etc).
10731073
*/
1074-
static noinline int svc_rdma_read_special(struct svcxprt_rdma *rdma,
1075-
struct svc_rdma_read_info *info)
1074+
static noinline int svc_rdma_read_special(struct svc_rqst *rqstp,
1075+
struct svc_rdma_recv_ctxt *head)
10761076
{
1077-
struct svc_rdma_recv_ctxt *head = info->ri_readctxt;
1078-
struct xdr_buf *buf = &info->ri_rqst->rq_arg;
1077+
struct xdr_buf *buf = &rqstp->rq_arg;
10791078
int ret;
10801079

1081-
ret = svc_rdma_read_call_chunk(info->ri_rqst, info->ri_readctxt);
1080+
ret = svc_rdma_read_call_chunk(rqstp, head);
10821081
if (ret < 0)
10831082
goto out;
10841083

10851084
buf->len += head->rc_readbytes;
10861085
buf->buflen += head->rc_readbytes;
10871086

1088-
buf->head[0].iov_base = page_address(info->ri_rqst->rq_pages[0]);
1087+
buf->head[0].iov_base = page_address(rqstp->rq_pages[0]);
10891088
buf->head[0].iov_len = min_t(size_t, PAGE_SIZE, head->rc_readbytes);
1090-
buf->pages = &info->ri_rqst->rq_pages[1];
1089+
buf->pages = &rqstp->rq_pages[1];
10911090
buf->page_len = head->rc_readbytes - buf->head[0].iov_len;
10921091

10931092
out:
@@ -1142,7 +1141,7 @@ int svc_rdma_process_read_list(struct svcxprt_rdma *rdma,
11421141
else
11431142
ret = svc_rdma_read_multiple_chunks(rqstp, head);
11441143
} else
1145-
ret = svc_rdma_read_special(rdma, info);
1144+
ret = svc_rdma_read_special(rqstp, head);
11461145
if (ret < 0)
11471146
goto out_err;
11481147

0 commit comments

Comments
 (0)