Skip to content

Commit 6e4b9b8

Browse files
committed
svcrdma: Update the synopsis of svc_rdma_read_data_item()
Since the RDMA Read I/O state is now contained in the recv_ctxt, svc_rdma_build_read_data_item() can use that recv_ctxt to derive that information 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 c7eb4fe commit 6e4b9b8

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

net/sunrpc/xprtrdma/svc_rdma_rw.c

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -892,8 +892,8 @@ static noinline int svc_rdma_read_multiple_chunks(struct svcxprt_rdma *rdma,
892892

893893
/**
894894
* svc_rdma_read_data_item - Construct RDMA Reads to pull data item Read chunks
895-
* @rdma: controlling transport
896-
* @info: context for RDMA Reads
895+
* @rqstp: RPC transaction context
896+
* @head: context for ongoing I/O
897897
*
898898
* The chunk data lands in the page list of rqstp->rq_arg.pages.
899899
*
@@ -908,17 +908,16 @@ static noinline int svc_rdma_read_multiple_chunks(struct svcxprt_rdma *rdma,
908908
* %-ENOTCONN: posting failed (connection is lost),
909909
* %-EIO: rdma_rw initialization failed (DMA mapping, etc).
910910
*/
911-
static int svc_rdma_read_data_item(struct svcxprt_rdma *rdma,
912-
struct svc_rdma_read_info *info)
911+
static int svc_rdma_read_data_item(struct svc_rqst *rqstp,
912+
struct svc_rdma_recv_ctxt *head)
913913
{
914-
struct svc_rdma_recv_ctxt *head = info->ri_readctxt;
915-
struct xdr_buf *buf = &info->ri_rqst->rq_arg;
914+
struct xdr_buf *buf = &rqstp->rq_arg;
916915
struct svc_rdma_chunk *chunk;
917916
unsigned int length;
918917
int ret;
919918

920919
chunk = pcl_first_chunk(&head->rc_read_pcl);
921-
ret = svc_rdma_build_read_chunk(info->ri_rqst, head, chunk);
920+
ret = svc_rdma_build_read_chunk(rqstp, head, chunk);
922921
if (ret < 0)
923922
goto out;
924923

@@ -940,7 +939,7 @@ static int svc_rdma_read_data_item(struct svcxprt_rdma *rdma,
940939
* Currently these chunks always start at page offset 0,
941940
* thus the rounded-up length never crosses a page boundary.
942941
*/
943-
buf->pages = &info->ri_rqst->rq_pages[0];
942+
buf->pages = &rqstp->rq_pages[0];
944943
length = xdr_align_size(chunk->ch_length);
945944
buf->page_len = length;
946945
buf->len += length;
@@ -1141,7 +1140,7 @@ int svc_rdma_process_read_list(struct svcxprt_rdma *rdma,
11411140

11421141
if (pcl_is_empty(&head->rc_call_pcl)) {
11431142
if (head->rc_read_pcl.cl_count == 1)
1144-
ret = svc_rdma_read_data_item(rdma, info);
1143+
ret = svc_rdma_read_data_item(rqstp, head);
11451144
else
11461145
ret = svc_rdma_read_multiple_chunks(rdma, info);
11471146
} else

0 commit comments

Comments
 (0)