From: Jeff Layton <jlayton@kernel.org>
To: Trond Myklebust <trondmy@kernel.org>, Anna Schumaker <anna@kernel.org>
Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org,
Jeff Layton <jlayton@kernel.org>
Subject: [PATCH 2/4] nfs: add a tracepoint to nfs_inode_detach_delegation_locked
Date: Tue, 03 Jun 2025 07:42:24 -0400 [thread overview]
Message-ID: <20250603-nfs-tracepoints-v1-2-d2615f3bbe6c@kernel.org> (raw)
In-Reply-To: <20250603-nfs-tracepoints-v1-0-d2615f3bbe6c@kernel.org>
We have tracepoints for setting a delegation and reclaiming them. Add a
tracepoint for when the delegation is being detached from the inode.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
fs/nfs/delegation.c | 2 ++
fs/nfs/nfs4trace.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
index 10ef46e29b2544920c026f023885301d5d8e22cd..78a97d340bbd98390ca8302176c17caf08dcab4a 100644
--- a/fs/nfs/delegation.c
+++ b/fs/nfs/delegation.c
@@ -355,6 +355,8 @@ nfs_detach_delegation_locked(struct nfs_inode *nfsi,
rcu_dereference_protected(nfsi->delegation,
lockdep_is_held(&clp->cl_lock));
+ trace_nfs4_detach_delegation(&nfsi->vfs_inode, delegation->type);
+
if (deleg_cur == NULL || delegation != deleg_cur)
return NULL;
diff --git a/fs/nfs/nfs4trace.h b/fs/nfs/nfs4trace.h
index deab4c0e21a0642ee97b0b81f8c55812f5028f7c..6e1c4590ef9bf60eac994e85be816e82f5e0c741 100644
--- a/fs/nfs/nfs4trace.h
+++ b/fs/nfs/nfs4trace.h
@@ -956,6 +956,7 @@ DECLARE_EVENT_CLASS(nfs4_set_delegation_event,
TP_ARGS(inode, fmode))
DEFINE_NFS4_SET_DELEGATION_EVENT(nfs4_set_delegation);
DEFINE_NFS4_SET_DELEGATION_EVENT(nfs4_reclaim_delegation);
+DEFINE_NFS4_SET_DELEGATION_EVENT(nfs4_detach_delegation);
TRACE_EVENT(nfs4_delegreturn_exit,
TP_PROTO(
--
2.49.0
next prev parent reply other threads:[~2025-06-03 11:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-03 11:42 [PATCH 0/4] nfs: client-side tracepoints for delegations and cache coherency Jeff Layton
2025-06-03 11:42 ` [PATCH 1/4] nfs: add cache_validity to the nfs_inode_event tracepoints Jeff Layton
2025-06-03 11:42 ` Jeff Layton [this message]
2025-06-03 11:42 ` [PATCH 3/4] nfs: new tracepoint in nfs_delegation_need_return Jeff Layton
2025-06-03 11:42 ` [PATCH 4/4] nfs: new tracepoint in match_stateid operation Jeff Layton
2025-06-10 13:04 ` Benjamin Coddington
2025-06-10 13:09 ` Jeff Layton
2025-06-17 18:45 ` Trond Myklebust
2025-06-10 13:05 ` [PATCH 0/4] nfs: client-side tracepoints for delegations and cache coherency Benjamin Coddington
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=20250603-nfs-tracepoints-v1-2-d2615f3bbe6c@kernel.org \
--to=jlayton@kernel.org \
--cc=anna@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=trondmy@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).