From: Benjamin Coddington <bcodding@redhat.com>
To: trond.myklebust@hammerspace.com, anna.schumaker@netapp.com
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH 3/3] NFS: Add a tracepoint to show the results of nfs_set_cache_invalid()
Date: Tue, 16 Nov 2021 08:49:24 -0500 [thread overview]
Message-ID: <04e061ea58bdb9b170ddace02c37e03b32ffce7e.1637069577.git.bcodding@redhat.com> (raw)
In-Reply-To: <cover.1637069577.git.bcodding@redhat.com>
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>
---
fs/nfs/inode.c | 1 +
fs/nfs/nfstrace.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 296ed8ea3273..e4b092e40178 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -216,6 +216,7 @@ void nfs_set_cache_invalid(struct inode *inode, unsigned long flags)
flags &= ~(NFS_INO_INVALID_DATA|NFS_INO_DATA_INVAL_DEFER);
flags &= ~(NFS_INO_REVAL_PAGECACHE | NFS_INO_REVAL_FORCED);
nfsi->cache_validity |= flags;
+ trace_nfs_set_cache_invalid(inode, 0);
}
EXPORT_SYMBOL_GPL(nfs_set_cache_invalid);
diff --git a/fs/nfs/nfstrace.h b/fs/nfs/nfstrace.h
index 8a224871be74..76bea172dce0 100644
--- a/fs/nfs/nfstrace.h
+++ b/fs/nfs/nfstrace.h
@@ -209,6 +209,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(
--
2.31.1
prev parent reply other threads:[~2021-11-16 13:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-16 13:49 [PATCH 0/3] COPY/CLONE pagecache invalidation Benjamin Coddington
2021-11-16 13:49 ` [PATCH 1/3] NFSv42: Fix pagecache invalidation after COPY/CLONE Benjamin Coddington
2021-11-16 13:57 ` Trond Myklebust
2021-11-16 14:01 ` Benjamin Coddington
2021-11-16 14:06 ` Benjamin Coddington
2021-11-16 15:26 ` Trond Myklebust
2021-11-16 13:49 ` [PATCH 2/3] NFSv42: Don't drop NFS_INO_INVALID_CHANGE if we hold a delegation Benjamin Coddington
2021-11-16 14:03 ` Trond Myklebust
2021-11-16 14:12 ` Benjamin Coddington
2021-11-16 14:17 ` Trond Myklebust
2021-11-16 14:34 ` Benjamin Coddington
2021-11-16 14:49 ` Trond Myklebust
2021-11-16 15:15 ` Benjamin Coddington
2021-11-16 13:49 ` Benjamin Coddington [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=04e061ea58bdb9b170ddace02c37e03b32ffce7e.1637069577.git.bcodding@redhat.com \
--to=bcodding@redhat.com \
--cc=anna.schumaker@netapp.com \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@hammerspace.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox