Skip to content

Commit c3299ae

Browse files
bcodding-rhmehmetb0
authored andcommitted
NFS: Add a tracepoint to show the results of nfs_set_cache_invalid()
BugLink: https://bugs.launchpad.net/bugs/2089533 [ Upstream commit 93c2e5e ] This provides some insight into the client's invalidation behavior to show both when the client uses the helper, and the results of calling the helper which can vary depending on how the helper is called. Signed-off-by: Benjamin Coddington <bcodding@redhat.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Stable-dep-of: 867da60 ("nfs: avoid i_lock contention in nfs_clear_invalid_mapping") Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Manuel Diewald <manuel.diewald@canonical.com> Signed-off-by: Mehmet Basaran <mehmet.basaran@canonical.com>
1 parent b5beaad commit c3299ae

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

fs/nfs/inode.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ void nfs_set_cache_invalid(struct inode *inode, unsigned long flags)
219219
NFS_INO_DATA_INVAL_DEFER);
220220
else if (nfsi->cache_validity & NFS_INO_INVALID_DATA)
221221
nfsi->cache_validity &= ~NFS_INO_DATA_INVAL_DEFER;
222+
trace_nfs_set_cache_invalid(inode, 0);
222223
}
223224
EXPORT_SYMBOL_GPL(nfs_set_cache_invalid);
224225

fs/nfs/nfstrace.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ DEFINE_NFS_INODE_EVENT_DONE(nfs_writeback_inode_exit);
162162
DEFINE_NFS_INODE_EVENT(nfs_fsync_enter);
163163
DEFINE_NFS_INODE_EVENT_DONE(nfs_fsync_exit);
164164
DEFINE_NFS_INODE_EVENT(nfs_access_enter);
165+
DEFINE_NFS_INODE_EVENT_DONE(nfs_set_cache_invalid);
165166

166167
TRACE_EVENT(nfs_access_exit,
167168
TP_PROTO(

0 commit comments

Comments
 (0)