summaryrefslogtreecommitdiff
path: root/fs/nfsd/filecache.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2022-03-27 16:42:20 -0400
committerChuck Lever <chuck.lever@oracle.com>2022-05-23 11:06:29 -0400
commit0122e882119ddbd9efa6edfeeac3f5c704a7aeea (patch)
tree513311503e752b21d4da8b3721c14097780a0069 /fs/nfsd/filecache.c
parent7e2ce0cc15a509b859199235a2bad9cece00f67a (diff)
downloadlwn-0122e882119ddbd9efa6edfeeac3f5c704a7aeea.tar.gz
lwn-0122e882119ddbd9efa6edfeeac3f5c704a7aeea.zip
NFSD: Trace filecache opens
Instrument calls to nfsd_open_verified() to get a sense of the filecache hit rate. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd/filecache.c')
-rw-r--r--fs/nfsd/filecache.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c
index 24772f246461..a7e3a443a2cb 100644
--- a/fs/nfsd/filecache.c
+++ b/fs/nfsd/filecache.c
@@ -995,10 +995,11 @@ open_file:
nf->nf_mark = nfsd_file_mark_find_or_create(nf);
if (nf->nf_mark) {
- if (open)
+ if (open) {
status = nfsd_open_verified(rqstp, fhp, may_flags,
&nf->nf_file);
- else
+ trace_nfsd_file_open(nf, status);
+ } else
status = nfs_ok;
} else
status = nfserr_jukebox;