HomeFreeBSD

nfscl: Set correct lockowner for "oneopenown" mount option

Description

nfscl: Set correct lockowner for "oneopenown" mount option

For NFSv4.1/4.2, the client may use either an open, lock or
delegation stateid as the stateid argument for an I/O operation.
RFC 5661 defines an order of preference of delegation, then lock
and finally open stateid for the argument, although NFSv4.1/4.2
servers are expected to handle any stateid type.

For the "oneopenown" mount option, the lock owner was not being
correctly generated and, as such, the I/O operation would use an
open stateid, even when a lock stateid existed. Although this
did not and should not affect an NFSv4.1/4.2 server's behaviour,
this patch makes the behaviour for "oneopenown" the same as when
the mount option is not specified.

Found during inspection of packet captures. No failure during
testing against NFSv4.1/4.2 servers of the unpatched code occurred.

(cherry picked from commit 54ff3b3986741b9cd06ce20b90c96711cbe146d0)

Details

Provenance
rmacklemAuthored on Jul 28 2021, 10:23 PM
Parents
rGa54cdded3d65: nfscl: Cache an open stateid for the "oneopenown" mount option
Branches
Unknown
Tags
Unknown