HomeFreeBSD

nfscl: Send stateid.seqid of 0 for NFSv4.1/4.2 mounts

Description

nfscl: Send stateid.seqid of 0 for NFSv4.1/4.2 mounts

For NFSv4.1/4.2, the client may set the "seqid" field of the
stateid to 0 in RPC requests. This indicates to the server that
it should not check the "seqid" or return NFSERR_OLDSTATEID if the
"seqid" value is not up to date w.r.t. Open/Lock operations
on the stateid. This "seqid" is incremented by the NFSv4 server
for each Open/OpenDowngrade/Lock/Locku operation done on the stateid.

Since a failure return of NFSERR_OLDSTATEID is of no use to
the client for I/O operations, it makes sense to set "seqid"
to 0 for the stateid argument for I/O operations.
This avoids server failure replies of NFSERR_OLDSTATEID,
although I am not aware of any case where this failure occurs.

This makes the FreeBSD NFSv4.1/4.2 client compatible with the
Linux NFSv4.1/4.2 client.

(cherry picked from commit 7685f8344d9a59e9498bdfebb48066f98216fecd)

Details

Provenance
rmacklemAuthored on Jul 20 2021, 12:35 AM
Parents
rG5f27244beb8a: src.conf.5: regen after 3f244aace29b
Branches
Unknown
Tags
Unknown