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.

MFC after: 2 weeks

Details

Provenance
rmacklemAuthored on Apr 10 2021, 10:50 PM
Parents
rGa7fbfdee732b: zfs: change format string in zio_fini to get rid of the cast
Branches
Unknown
Tags
Unknown