Home
last modified time | relevance | path

Searched hist:"76 ce4dcec0dc08a032db916841ddc4e3998be317" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/fs/nfsd/
H A Dnfs4proc.cdiff 76ce4dcec0dc08a032db916841ddc4e3998be317 Thu Sep 01 14:29:55 CDT 2022 Chuck Lever <chuck.lever@oracle.com> 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>