HomeFreeBSD

nfscl: Fix NFSv4.1/4.2 mount recovery from an expired lease

Description

nfscl: Fix NFSv4.1/4.2 mount recovery from an expired lease

The most difficult NFSv4 client recovery case happens when the
lease has expired on the server. For NFSv4.0, the client will
receive a NFSERR_EXPIRED reply from the server to indicate this
has happened.
For NFSv4.1/4.2, most RPCs have a Sequence operation and, as such,
the client will receive a NFSERR_BADSESSION reply when the lease
has expired for these RPCs. The client will then call nfscl_recover()
to handle the NFSERR_BADSESSION reply. However, for the expired lease
case, the first reclaim Open will fail with NFSERR_NOGRACE.

This patch recognizes this case and calls nfscl_expireclient()
to handle the recovery from an expired lease.

This patch only affects NFSv4.1/4.2 mounts when the lease
expires on the server, due to a network partitioning that
exceeds the lease duration or similar.

MFC after: 2 weeks

Details

Provenance
rmacklemAuthored on May 19 2021, 9:52 PM
Parents
rGfe815b88b553: Fix fsck_ffs Pass 1b error exit "bad inode number 256 to nextinode".
Branches
Unknown
Tags
Unknown