From: Jeff Layton Date: Wed, 18 Jun 2025 13:19:13 +0000 (-0400) Subject: nfs: add a tracepoint to nfs_inode_detach_delegation_locked X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=0139a30ada76d154ff48dfe7a1d2056f7d7ae023;p=users%2Fjedix%2Flinux-maple.git nfs: add a tracepoint to nfs_inode_detach_delegation_locked We have tracepoints for setting a delegation and reclaiming them. Add a tracepoint for when the delegation is being detached from the inode. Reviewed-by: Benjamin Coddington Signed-off-by: Jeff Layton Link: https://lore.kernel.org/r/20250618-nfs-tracepoints-v2-2-540c9fb48da2@kernel.org Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index 10ef46e29b254..78a97d340bbd9 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 9f69d7e149255..674f15e91c544 100644 --- a/fs/nfs/nfs4trace.h +++ b/fs/nfs/nfs4trace.h @@ -983,6 +983,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(