diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2022-09-01 15:29:55 -0400 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2022-09-26 14:02:50 -0400 |
commit | 76ce4dcec0dc08a032db916841ddc4e3998be317 (patch) | |
tree | a6197a1be388b7434fdc201b6306b41807c0ff36 /.clang-format | |
parent | 781fde1a2ba2391f31142f46f964cf1148ca1791 (diff) | |
download | linux-76ce4dcec0dc08a032db916841ddc4e3998be317.tar.bz2 |
NFSD: Cap rsize_bop result based on send buffer size
Since before the git era, NFSD has conserved the number of pages
held by each nfsd thread by combining the RPC receive and send
buffers into a single array of pages. This works because there are
no cases where an operation needs a large RPC Call message and a
large RPC Reply at the same time.
Once an RPC Call has been received, svc_process() updates
svc_rqst::rq_res to describe the part of rq_pages that can be
used for constructing the Reply. This means that the send buffer
(rq_res) shrinks when the received RPC record containing the RPC
Call is large.
Add an NFSv4 helper that computes the size of the send buffer. It
replaces svc_max_payload() in spots where svc_max_payload() returns
a value that might be larger than the remaining send buffer space.
Callers who need to know the transport's actual maximum payload size
will continue to use svc_max_payload().
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to '.clang-format')
0 files changed, 0 insertions, 0 deletions