]> www.infradead.org Git - users/jedix/linux-maple.git/commit
nfsd: disallow file locking and delegations for NFSv4 reexport
authorMike Snitzer <snitzer@kernel.org>
Mon, 10 Feb 2025 16:25:53 +0000 (11:25 -0500)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 10 Mar 2025 13:11:08 +0000 (09:11 -0400)
commit9254c8ae9b8172d9ad26e620a4bbc604a1efa7fa
tree18e570061387209e273374459ea9ed87e11b1001
parentfbfdc9fc0f66e7877a6d1a6e44c6acac46c5b811
nfsd: disallow file locking and delegations for NFSv4 reexport

We do not and cannot support file locking with NFS reexport over
NFSv4.x for the same reason we don't do it for NFSv3: NFS reexport
server reboot cannot allow clients to recover locks because the source
NFS server has not rebooted, and so it is not in grace.  Since the
source NFS server is not in grace, it cannot offer any guarantees that
the file won't have been changed between the locks getting lost and
any attempt to recover/reclaim them.  The same applies to delegations
and any associated locks, so disallow them too.

Clients are no longer allowed to get file locks or delegations from a
reexport server, any attempts will fail with operation not supported.

Update the "Reboot recovery" section accordingly in
Documentation/filesystems/nfs/reexport.rst

Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Documentation/filesystems/nfs/reexport.rst
fs/nfs/export.c
fs/nfsd/nfs4state.c
include/linux/exportfs.h