aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2018-01-03 15:38:09 -0500
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2018-01-23 09:44:38 -0500
commitaae2349c49198e5dc7376519201cb4647a902e0f (patch)
treeefe1dc13245079333d10ce078e1d424ab337d42a
parentae7246762530af00109c3fb8a30031da054c0aa0 (diff)
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: 9d6b04097882 ("xprtrdma: Place registered MWs on a ... ") Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
-rw-r--r--net/sunrpc/xprtrdma/rpc_rdma.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sunrpc/xprtrdma/rpc_rdma.c b/net/sunrpc/xprtrdma/rpc_rdma.c
index 1ae9b41b75a1..162e5dd82466 100644
--- a/net/sunrpc/xprtrdma/rpc_rdma.c
+++ b/net/sunrpc/xprtrdma/rpc_rdma.c
@@ -431,7 +431,7 @@ rpcrdma_encode_write_list(struct rpcrdma_xprt *r_xprt, struct rpcrdma_req *req,
431 431
432 trace_xprtrdma_write_chunk(rqst->rq_task, mr, nsegs); 432 trace_xprtrdma_write_chunk(rqst->rq_task, mr, nsegs);
433 r_xprt->rx_stats.write_chunk_count++; 433 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;
435 nchunks++; 435 nchunks++;
436 nsegs -= mr->mr_nents; 436 nsegs -= mr->mr_nents;
437 } while (nsegs); 437 } while (nsegs);
@@ -489,7 +489,7 @@ rpcrdma_encode_reply_chunk(struct rpcrdma_xprt *r_xprt, struct rpcrdma_req *req,
489 489
490 trace_xprtrdma_reply_chunk(rqst->rq_task, mr, nsegs); 490 trace_xprtrdma_reply_chunk(rqst->rq_task, mr, nsegs);
491 r_xprt->rx_stats.reply_chunk_count++; 491 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;
493 nchunks++; 493 nchunks++;
494 nsegs -= mr->mr_nents; 494 nsegs -= mr->mr_nents;
495 } while (nsegs); 495 } while (nsegs);