nfsd: implement OPEN_ARGS_SHARE_ACCESS_WANT_OPEN_XOR_DELEGATION
authorJeff Layton <jlayton@kernel.org>
Mon, 9 Dec 2024 21:14:02 +0000 (16:14 -0500)
committerChuck Lever <chuck.lever@oracle.com>
Tue, 21 Jan 2025 20:30:01 +0000 (15:30 -0500)
commitd3edfd9ed17cb3bc754b3064051fb5df7863fda3
treecb1dfe682ad51060605439caf61a3d1b45a9fe66
parent7e13f4f8d27dc02fb88666f603c53ca749d56f92
nfsd: implement OPEN_ARGS_SHARE_ACCESS_WANT_OPEN_XOR_DELEGATION

Allow clients to request getting a delegation xor an open stateid if a
delegation isn't available. This allows the client to avoid sending a
final CLOSE for the (useless) open stateid, when it is granted a
delegation.

If this flag is requested by the client and there isn't already a new
open stateid, discard the new open stateid before replying.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/nfs4state.c
fs/nfsd/nfs4xdr.c