]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
nfsd: fix replies from session cache for retried RPCs
authorRick Macklem <rmacklem@FreeBSD.org>
Thu, 8 Apr 2021 21:04:22 +0000 (14:04 -0700)
committerRick Macklem <rmacklem@FreeBSD.org>
Thu, 22 Apr 2021 13:54:31 +0000 (06:54 -0700)
commit0e0aa1eed8fa18ab31fb6a3e6fe135b41d2a9923
treefef2e18b8734b13d8a80c109ea85779a4eed6d18
parentb8beded343980477e6d670c263fda7b0007510cc
nfsd: fix replies from session cache for retried RPCs

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.

The FreeBSD server failec to reply using the cached
reply in the session slot when an RPC was retried on
the session slot, as indicated by same slot sequence#.

This patch fixes this.  It should also fix a similar
failure for NFSv4.0 mounts, when the sequence# in
the open/lock_owner requires a reply be done from
an entry locked into the DRC.

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

(cherry picked from commit 05a39c2c1c18cd0c4382a4f58e0952d3f77e7dfa)
sys/fs/nfsserver/nfs_nfsdkrpc.c
sys/fs/nfsserver/nfs_nfsdsubs.c