HomeFreeBSD

nfsd: fix replies from session cache for multiple retries

Description

nfsd: fix replies from session cache for multiple retries

Recent testing of network partitioning a FreeBSD NFSv4.1
server from a Linux NFSv4.1 client identified problems
with both the FreeBSD server and Linux client.

Commit 05a39c2c1c18 fixed replying with the cached reply in
in the session slot if same session slot sequence#.
However, the code uses the reply and, as such,
will fail for a subsequent retry of the RPC.
A subsequent retry would be an extremely rare event,
but this patch fixes this, so long as m_copym(..M_NOWAIT)
does not fail, which should also be a rare event.

This fix affects the exceedingly rare case where a NFSv4
client retries a non-idempotent RPC, such as a lock
operation, multiple times. Note that retries only occur
after the client has needed to create a new TCP connection,
with a new TCP connection for each retry.

PR: 254816

(cherry picked from commit 22cefe3d8378f58adcdbb2c7589b9f30c2a38315)

Details

Provenance
rmacklemAuthored on Apr 10 2021, 10:50 PM
Parents
rGdd01826ad3ad: mpt(4): Remove incorrect S/G segments limits.
Branches
Unknown
Tags
Unknown