NFSv4: Ask for a delegation or an open stateid in OPEN
authorTrond Myklebust <trond.myklebust@primarydata.com>
Mon, 17 Jun 2024 01:21:35 +0000 (21:21 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Mon, 8 Jul 2024 17:47:26 +0000 (13:47 -0400)
Turn on the optimisation to allow the client to request that the server
not return the open stateid when it returns a delegation.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Lance Shelton <lance.shelton@hammerspace.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/nfs4proc.c

index 5b18aac0b34a5d28889219bf7a6a2511472c5603..b1376571f6ef70589ea2f57f46dd6ceaaecac0b5 100644 (file)
@@ -1358,6 +1358,8 @@ nfs4_map_atomic_open_share(struct nfs_server *server,
        /* res |= NFS4_SHARE_WANT_NO_PREFERENCE; */
        if (server->caps & NFS_CAP_DELEGTIME)
                res |= NFS4_SHARE_WANT_DELEG_TIMESTAMPS;
+       if (server->caps & NFS_CAP_OPEN_XOR)
+               res |= NFS4_SHARE_WANT_OPEN_XOR_DELEGATION;
 out:
        return res;
 }