aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2024-03-05 10:34:41 -0500
committerJeff Layton <jlayton@kernel.org>2024-04-23 07:24:30 -0400
commit73ca2c83154f641430c3f9c5da291cd94b7a0aab (patch)
tree0b1030000ae084a5e15cb0bd25b178fe02556782
parentc187ac31610049a023fdbd7402a32e1fb290b156 (diff)
downloadlinux-73ca2c83154f641430c3f9c5da291cd94b7a0aab.tar.gz
nfs: add a tracepoint to nfs_inode_detach_delegation_locked
We have a tracepoint 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>
-rw-r--r--fs/nfs/delegation.c2
-rw-r--r--fs/nfs/nfs4trace.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
index 6bace5fece04e2..7275b54a2c317b 100644
--- a/fs/nfs/delegation.c
+++ b/fs/nfs/delegation.c
@@ -338,6 +338,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 10985a4b8259dd..a9bc0e030feb62 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(