aboutsummaryrefslogtreecommitdiff
path: root/lib/locking-selftest-wlock-softirq.h
diff options
context:
space:
mode:
authorChuck Lever2022-09-01 15:29:55 -0400
committerChuck Lever2022-09-26 14:02:50 -0400
commit76ce4dcec0dc08a032db916841ddc4e3998be317 (patch)
treea6197a1be388b7434fdc201b6306b41807c0ff36 /lib/locking-selftest-wlock-softirq.h
parent781fde1a2ba2391f31142f46f964cf1148ca1791 (diff)
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 'lib/locking-selftest-wlock-softirq.h')
0 files changed, 0 insertions, 0 deletions