From a0b685e7bd7c5d232a64b0707d2f83ae3e1840dc Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Mon, 3 Oct 2022 13:03:52 -0400 Subject: NFSv4.2: Add a tracepoint for listxattr This can be defined as simply an NFS4_INODE_EVENT() since we don't have the name of a specific xattr to list. This roughly matches readdir, which also uses an NFS4_INODE_EVENT() tracepoint. Signed-off-by: Anna Schumaker --- fs/nfs/nfs42proc.c | 1 + fs/nfs/nfs4trace.h | 2 ++ 2 files changed, 3 insertions(+) (limited to 'fs/nfs') diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c index c4791ca00df1..ced9170701b6 100644 --- a/fs/nfs/nfs42proc.c +++ b/fs/nfs/nfs42proc.c @@ -1320,6 +1320,7 @@ static ssize_t _nfs42_proc_listxattrs(struct inode *inode, void *buf, ret = nfs4_call_sync(server->client, server, &msg, &arg.seq_args, &res.seq_res, 0); + trace_nfs4_listxattr(inode, ret); if (ret >= 0) { ret = res.copied; diff --git a/fs/nfs/nfs4trace.h b/fs/nfs/nfs4trace.h index 650c9353826f..2cff5901c689 100644 --- a/fs/nfs/nfs4trace.h +++ b/fs/nfs/nfs4trace.h @@ -2542,6 +2542,8 @@ DECLARE_EVENT_CLASS(nfs4_xattr_event, DEFINE_NFS4_XATTR_EVENT(nfs4_getxattr); DEFINE_NFS4_XATTR_EVENT(nfs4_setxattr); DEFINE_NFS4_XATTR_EVENT(nfs4_removexattr); + +DEFINE_NFS4_INODE_EVENT(nfs4_listxattr); #endif /* CONFIG_NFS_V4_2 */ #endif /* CONFIG_NFS_V4_1 */ -- cgit v1.2.3-59-g8ed1b