NFSv4.2: Add a tracepoint for listxattr
authorAnna Schumaker <Anna.Schumaker@Netapp.com>
Mon, 3 Oct 2022 17:03:52 +0000 (13:03 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Wed, 5 Oct 2022 19:47:16 +0000 (15:47 -0400)
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 <Anna.Schumaker@Netapp.com>
fs/nfs/nfs42proc.c
fs/nfs/nfs4trace.h

index c4791ca00df1b8fff49b70ab14685d7fdf6f12c5..ced9170701b64f80d7cb95f08ecc316e5f43595f 100644 (file)
@@ -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;
index 650c9353826f36637c182b4ea51e1799ccd186cd..2cff5901c6894f209035b2bc812476f03954a555 100644 (file)
@@ -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 */