Skip to content

Commit 23bab3b

Browse files
committed
svcrdma: Update the synopsis of svc_rdma_read_call_chunk()
Since the RDMA Read I/O state is now contained in the recv_ctxt, svc_rdma_read_call_chunk() 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 740a3c8 commit 23bab3b

1 file changed

Lines changed: 11 additions & 13 deletions

File tree

net/sunrpc/xprtrdma/svc_rdma_rw.c

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -998,8 +998,8 @@ static int svc_rdma_read_chunk_range(struct svc_rqst *rqstp,
998998

999999
/**
10001000
* svc_rdma_read_call_chunk - Build RDMA Read WQEs to pull a Long Message
1001-
* @rdma: controlling transport
1002-
* @info: context for RDMA Reads
1001+
* @rqstp: RPC transaction context
1002+
* @head: context for ongoing I/O
10031003
*
10041004
* Return values:
10051005
* %0: RDMA Read WQEs were successfully built
@@ -1008,10 +1008,9 @@ static int svc_rdma_read_chunk_range(struct svc_rqst *rqstp,
10081008
* %-ENOTCONN: posting failed (connection is lost),
10091009
* %-EIO: rdma_rw initialization failed (DMA mapping, etc).
10101010
*/
1011-
static int svc_rdma_read_call_chunk(struct svcxprt_rdma *rdma,
1012-
struct svc_rdma_read_info *info)
1011+
static int svc_rdma_read_call_chunk(struct svc_rqst *rqstp,
1012+
struct svc_rdma_recv_ctxt *head)
10131013
{
1014-
struct svc_rdma_recv_ctxt *head = info->ri_readctxt;
10151014
const struct svc_rdma_chunk *call_chunk =
10161015
pcl_first_chunk(&head->rc_call_pcl);
10171016
const struct svc_rdma_pcl *pcl = &head->rc_read_pcl;
@@ -1020,19 +1019,18 @@ static int svc_rdma_read_call_chunk(struct svcxprt_rdma *rdma,
10201019
int ret;
10211020

10221021
if (pcl_is_empty(pcl))
1023-
return svc_rdma_build_read_chunk(info->ri_rqst, head,
1024-
call_chunk);
1022+
return svc_rdma_build_read_chunk(rqstp, head, call_chunk);
10251023

10261024
start = 0;
10271025
chunk = pcl_first_chunk(pcl);
10281026
length = chunk->ch_position;
1029-
ret = svc_rdma_read_chunk_range(info->ri_rqst, head, call_chunk,
1027+
ret = svc_rdma_read_chunk_range(rqstp, head, call_chunk,
10301028
start, length);
10311029
if (ret < 0)
10321030
return ret;
10331031

10341032
pcl_for_each_chunk(chunk, pcl) {
1035-
ret = svc_rdma_build_read_chunk(info->ri_rqst, head, chunk);
1033+
ret = svc_rdma_build_read_chunk(rqstp, head, chunk);
10361034
if (ret < 0)
10371035
return ret;
10381036

@@ -1042,15 +1040,15 @@ static int svc_rdma_read_call_chunk(struct svcxprt_rdma *rdma,
10421040

10431041
start += length;
10441042
length = next->ch_position - head->rc_readbytes;
1045-
ret = svc_rdma_read_chunk_range(info->ri_rqst, head,
1046-
call_chunk, start, length);
1043+
ret = svc_rdma_read_chunk_range(rqstp, head, call_chunk,
1044+
start, length);
10471045
if (ret < 0)
10481046
return ret;
10491047
}
10501048

10511049
start += length;
10521050
length = call_chunk->ch_length - start;
1053-
return svc_rdma_read_chunk_range(info->ri_rqst, head, call_chunk,
1051+
return svc_rdma_read_chunk_range(rqstp, head, call_chunk,
10541052
start, length);
10551053
}
10561054

@@ -1080,7 +1078,7 @@ static noinline int svc_rdma_read_special(struct svcxprt_rdma *rdma,
10801078
struct xdr_buf *buf = &info->ri_rqst->rq_arg;
10811079
int ret;
10821080

1083-
ret = svc_rdma_read_call_chunk(rdma, info);
1081+
ret = svc_rdma_read_call_chunk(info->ri_rqst, info->ri_readctxt);
10841082
if (ret < 0)
10851083
goto out;
10861084

0 commit comments

Comments
 (0)