Skip to content

Commit aae2349

Browse files
chuckleveramschuma-ntap
authored andcommitted
xprtrdma: Fix "bytes registered" accounting
The contents of seg->mr_len changed when ->ro_map stopped returning the full chunk length in the first segment. Count the full length of each Write chunk, not the length of the first segment (which now can only be as large as a page). Fixes: 9d6b040 ("xprtrdma: Place registered MWs on a ... ") Signed-off-by: Chuck Lever <[email protected]> Signed-off-by: Anna Schumaker <[email protected]>
1 parent ae72467 commit aae2349

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/sunrpc/xprtrdma/rpc_rdma.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ rpcrdma_encode_write_list(struct rpcrdma_xprt *r_xprt, struct rpcrdma_req *req,
431431

432432
trace_xprtrdma_write_chunk(rqst->rq_task, mr, nsegs);
433433
r_xprt->rx_stats.write_chunk_count++;
434-
r_xprt->rx_stats.total_rdma_request += seg->mr_len;
434+
r_xprt->rx_stats.total_rdma_request += mr->mr_length;
435435
nchunks++;
436436
nsegs -= mr->mr_nents;
437437
} while (nsegs);
@@ -489,7 +489,7 @@ rpcrdma_encode_reply_chunk(struct rpcrdma_xprt *r_xprt, struct rpcrdma_req *req,
489489

490490
trace_xprtrdma_reply_chunk(rqst->rq_task, mr, nsegs);
491491
r_xprt->rx_stats.reply_chunk_count++;
492-
r_xprt->rx_stats.total_rdma_request += seg->mr_len;
492+
r_xprt->rx_stats.total_rdma_request += mr->mr_length;
493493
nchunks++;
494494
nsegs -= mr->mr_nents;
495495
} while (nsegs);

0 commit comments

Comments
 (0)