summaryrefslogtreecommitdiff
path: root/fs/nfsd/state.h
diff options
context:
space:
mode:
authorDai Ngo <dai.ngo@oracle.com>2023-06-30 04:52:39 +0300
committerChuck Lever <chuck.lever@oracle.com>2023-08-30 00:45:22 +0300
commitfd19ca36fd782b84f71b86525b91a905cda913a4 (patch)
tree19568de0e4acd13ed888ccdaa826df3ba7df4dce /fs/nfsd/state.h
parentd67cd907cf8ae2cd42e4f3859ad4de4c16d0c2a3 (diff)
downloadlinux-fd19ca36fd782b84f71b86525b91a905cda913a4.tar.xz
NFSD: handle GETATTR conflict with write delegation
If the GETATTR request on a file that has write delegation in effect and the request attributes include the change info and size attribute then the write delegation is recalled. If the delegation is returned within 30ms then the GETATTR is serviced as normal otherwise the NFS4ERR_DELAY error is returned for the GETATTR. Add counter for write delegation recall due to conflict GETATTR. This is used to evaluate the need to implement CB_GETATTR to adoid recalling the delegation with conflit GETATTR. Signed-off-by: Dai Ngo <dai.ngo@oracle.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd/state.h')
-rw-r--r--fs/nfsd/state.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h
index d49d3060ed4f..cbddcf484dba 100644
--- a/fs/nfsd/state.h
+++ b/fs/nfsd/state.h
@@ -732,4 +732,7 @@ static inline bool try_to_expire_client(struct nfs4_client *clp)
cmpxchg(&clp->cl_state, NFSD4_COURTESY, NFSD4_EXPIRABLE);
return clp->cl_state == NFSD4_EXPIRABLE;
}
+
+extern __be32 nfsd4_deleg_getattr_conflict(struct svc_rqst *rqstp,
+ struct inode *inode);
#endif /* NFSD4_STATE_H */