Skip to content

Commit

Permalink
xfs: trace ATTR flags in xattr tracepoints
Browse files Browse the repository at this point in the history
This will trace i.e. the ATTR_SECURE/ATTR_CREATE/ATTR_REPLACE
flags as well as the OP_FLAGS.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  • Loading branch information
Eric Sandeen authored and Darrick J. Wong committed May 9, 2018
1 parent 8b26984 commit e443523
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fs/xfs/xfs_trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -1750,6 +1750,7 @@ DECLARE_EVENT_CLASS(xfs_attr_class,
__field(int, namelen)
__field(int, valuelen)
__field(xfs_dahash_t, hashval)
__field(int, flags)
__field(int, op_flags)
),
TP_fast_assign(
Expand All @@ -1760,17 +1761,19 @@ DECLARE_EVENT_CLASS(xfs_attr_class,
__entry->namelen = args->namelen;
__entry->valuelen = args->valuelen;
__entry->hashval = args->hashval;
__entry->flags = args->flags;
__entry->op_flags = args->op_flags;
),
TP_printk("dev %d:%d ino 0x%llx name %.*s namelen %d valuelen %d "
"hashval 0x%x op_flags %s",
"hashval 0x%x flags %s op_flags %s",
MAJOR(__entry->dev), MINOR(__entry->dev),
__entry->ino,
__entry->namelen,
__entry->namelen ? __get_str(name) : NULL,
__entry->namelen,
__entry->valuelen,
__entry->hashval,
__print_flags(__entry->flags, "|", XFS_ATTR_FLAGS),
__print_flags(__entry->op_flags, "|", XFS_DA_OP_FLAGS))
)

Expand Down

0 comments on commit e443523

Please sign in to comment.