summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/stats.c
diff options
context:
space:
mode:
authorDai Ngo <dai.ngo@oracle.com>2023-06-30 03:52:39 +0200
committerChuck Lever <chuck.lever@oracle.com>2023-08-29 23:45:22 +0200
commitfd19ca36fd782b84f71b86525b91a905cda913a4 (patch)
tree19568de0e4acd13ed888ccdaa826df3ba7df4dce /fs/nfsd/stats.c
parentlocks: allow support for write delegation (diff)
downloadlinux-fd19ca36fd782b84f71b86525b91a905cda913a4.tar.xz
linux-fd19ca36fd782b84f71b86525b91a905cda913a4.zip
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/stats.c')
-rw-r--r--fs/nfsd/stats.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfsd/stats.c b/fs/nfsd/stats.c
index 777e24e5da33..63797635e1c3 100644
--- a/fs/nfsd/stats.c
+++ b/fs/nfsd/stats.c
@@ -65,6 +65,8 @@ static int nfsd_show(struct seq_file *seq, void *v)
seq_printf(seq, " %lld",
percpu_counter_sum_positive(&nfsdstats.counter[NFSD_STATS_NFS4_OP(i)]));
}
+ seq_printf(seq, "\nwdeleg_getattr %lld",
+ percpu_counter_sum_positive(&nfsdstats.counter[NFSD_STATS_WDELEG_GETATTR]));
seq_putc(seq, '\n');
#endif