]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
NFS: Add a tracepoint to show the results of nfs_set_cache_invalid()
authorBenjamin Coddington <bcodding@redhat.com>
Tue, 16 Nov 2021 13:49:24 +0000 (08:49 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Nov 2024 12:13:35 +0000 (13:13 +0100)
[ Upstream commit 93c2e5e0a9ecfc183ab1204e1ecaa7ee7eb2a61a ]

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: 867da60d463b ("nfs: avoid i_lock contention in nfs_clear_invalid_mapping")
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/inode.c
fs/nfs/nfstrace.h

index 48ade92d4ce8c350362ce60d111b19cc8e427288..3861cd056cec30aec9b9a66cdd090e38e9859ca1 100644 (file)
@@ -219,6 +219,7 @@ void nfs_set_cache_invalid(struct inode *inode, unsigned long flags)
                                          NFS_INO_DATA_INVAL_DEFER);
        else if (nfsi->cache_validity & NFS_INO_INVALID_DATA)
                nfsi->cache_validity &= ~NFS_INO_DATA_INVAL_DEFER;
+       trace_nfs_set_cache_invalid(inode, 0);
 }
 EXPORT_SYMBOL_GPL(nfs_set_cache_invalid);
 
index 6804ca2efbf99754a47e87f508c8c1f1a1a7ba9c..cbdfe091f56a66cb770ccaccd4db728597262940 100644 (file)
@@ -162,6 +162,7 @@ DEFINE_NFS_INODE_EVENT_DONE(nfs_writeback_inode_exit);
 DEFINE_NFS_INODE_EVENT(nfs_fsync_enter);
 DEFINE_NFS_INODE_EVENT_DONE(nfs_fsync_exit);
 DEFINE_NFS_INODE_EVENT(nfs_access_enter);
+DEFINE_NFS_INODE_EVENT_DONE(nfs_set_cache_invalid);
 
 TRACE_EVENT(nfs_access_exit,
                TP_PROTO(