Commit b262e5df authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Alex Elder

xfs: fix dquota trace format

The be32_to_cpu in the TP_printk output breaks automatic parsing of
the trace format by the trace-cmd tools, so we have to move it into
the TP_assign block.  While we're at it also fix the format for the
quota limits to more regular and easier parseable.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDave Chinner <david@fromorbit.com>
Signed-off-by: default avatarAlex Elder <aelder@sgi.com>
parent a9cc799e
...@@ -593,7 +593,7 @@ DECLARE_EVENT_CLASS(xfs_dquot_class, ...@@ -593,7 +593,7 @@ DECLARE_EVENT_CLASS(xfs_dquot_class,
TP_ARGS(dqp), TP_ARGS(dqp),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(dev_t, dev) __field(dev_t, dev)
__field(__be32, id) __field(u32, id)
__field(unsigned, flags) __field(unsigned, flags)
__field(unsigned, nrefs) __field(unsigned, nrefs)
__field(unsigned long long, res_bcount) __field(unsigned long long, res_bcount)
...@@ -606,7 +606,7 @@ DECLARE_EVENT_CLASS(xfs_dquot_class, ...@@ -606,7 +606,7 @@ DECLARE_EVENT_CLASS(xfs_dquot_class,
), \ ), \
TP_fast_assign( TP_fast_assign(
__entry->dev = dqp->q_mount->m_super->s_dev; __entry->dev = dqp->q_mount->m_super->s_dev;
__entry->id = dqp->q_core.d_id; __entry->id = be32_to_cpu(dqp->q_core.d_id);
__entry->flags = dqp->dq_flags; __entry->flags = dqp->dq_flags;
__entry->nrefs = dqp->q_nrefs; __entry->nrefs = dqp->q_nrefs;
__entry->res_bcount = dqp->q_res_bcount; __entry->res_bcount = dqp->q_res_bcount;
...@@ -622,10 +622,10 @@ DECLARE_EVENT_CLASS(xfs_dquot_class, ...@@ -622,10 +622,10 @@ DECLARE_EVENT_CLASS(xfs_dquot_class,
be64_to_cpu(dqp->q_core.d_ino_softlimit); be64_to_cpu(dqp->q_core.d_ino_softlimit);
), ),
TP_printk("dev %d:%d id 0x%x flags %s nrefs %u res_bc 0x%llx " TP_printk("dev %d:%d id 0x%x flags %s nrefs %u res_bc 0x%llx "
"bcnt 0x%llx [hard 0x%llx | soft 0x%llx] " "bcnt 0x%llx bhardlimit 0x%llx bsoftlimit 0x%llx "
"icnt 0x%llx [hard 0x%llx | soft 0x%llx]", "icnt 0x%llx ihardlimit 0x%llx isoftlimit 0x%llx]",
MAJOR(__entry->dev), MINOR(__entry->dev), MAJOR(__entry->dev), MINOR(__entry->dev),
be32_to_cpu(__entry->id), __entry->id,
__print_flags(__entry->flags, "|", XFS_DQ_FLAGS), __print_flags(__entry->flags, "|", XFS_DQ_FLAGS),
__entry->nrefs, __entry->nrefs,
__entry->res_bcount, __entry->res_bcount,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment