Skip to content

Commit 93c2e5e

Browse files
bcodding-rhTrond Myklebust
authored andcommitted
NFS: Add a tracepoint to show the results of nfs_set_cache_invalid()
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>
1 parent d3c4582 commit 93c2e5e

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

‎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)