NFSD: handle GETATTR conflict with write delegation
authorDai Ngo <dai.ngo@oracle.com>
Fri, 30 Jun 2023 01:52:39 +0000 (18:52 -0700)
committerChuck Lever <chuck.lever@oracle.com>
Tue, 29 Aug 2023 21:45:22 +0000 (17:45 -0400)
commitfd19ca36fd782b84f71b86525b91a905cda913a4
tree19568de0e4acd13ed888ccdaa826df3ba7df4dce
parentd67cd907cf8ae2cd42e4f3859ad4de4c16d0c2a3
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>
fs/nfsd/nfs4state.c
fs/nfsd/nfs4xdr.c
fs/nfsd/state.h
fs/nfsd/stats.c
fs/nfsd/stats.h