Skip to content

Commit

Permalink
NFSv4.2: Add a tracepoint for listxattr
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
amschuma-ntap committed Oct 5, 2022
1 parent 27ffed1 commit a0b685e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions fs/nfs/nfs42proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions fs/nfs/nfs4trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit a0b685e

Please sign in to comment.