Commit e3e9d44d authored by Trond Myklebust's avatar Trond Myklebust Committed by Anna Schumaker

NFSv4: Enable attribute delegations

If we see that the server supports attribute delegations, then request
them by setting the appropriate OPEN arguments.
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: default avatarLance Shelton <lance.shelton@hammerspace.com>
Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
parent dcb3c20f
...@@ -1339,8 +1339,13 @@ nfs4_map_atomic_open_share(struct nfs_server *server, ...@@ -1339,8 +1339,13 @@ nfs4_map_atomic_open_share(struct nfs_server *server,
if (!(server->caps & NFS_CAP_ATOMIC_OPEN_V1)) if (!(server->caps & NFS_CAP_ATOMIC_OPEN_V1))
goto out; goto out;
/* Want no delegation if we're using O_DIRECT */ /* Want no delegation if we're using O_DIRECT */
if (openflags & O_DIRECT) if (openflags & O_DIRECT) {
res |= NFS4_SHARE_WANT_NO_DELEG; res |= NFS4_SHARE_WANT_NO_DELEG;
goto out;
}
/* res |= NFS4_SHARE_WANT_NO_PREFERENCE; */
if (server->caps & NFS_CAP_DELEGTIME)
res |= NFS4_SHARE_WANT_DELEG_TIMESTAMPS;
out: out:
return res; return res;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment