]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
nfscl: Set correct lockowner for "oneopenown" mount option
authorRick Macklem <rmacklem@FreeBSD.org>
Wed, 28 Jul 2021 22:23:05 +0000 (15:23 -0700)
committerRick Macklem <rmacklem@FreeBSD.org>
Wed, 28 Jul 2021 22:23:05 +0000 (15:23 -0700)
commit54ff3b3986741b9cd06ce20b90c96711cbe146d0
tree8efaf172b3a175c088e725901f3ece3ce60c4ad2
parent4dbac528db6040694cd57c42a64e036daa91db86
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.

MFC after: 2 weeks
sys/fs/nfsclient/nfs_clstate.c