Commit af6265a0 authored by Darrick J. Wong's avatar Darrick J. Wong

xfs: standardize inode number formatting in ftrace output

Always print inode numbers in hexadecimal and preceded with the unit
"ino" or "agino", as apropriate.  Fix one tracepoint that used "ino %u"
for an inode btree block count to reduce confusion.
Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
Reviewed-by: default avatarCarlos Maiolino <cmaiolino@redhat.com>
parent 3fd7cb84
...@@ -103,7 +103,7 @@ DECLARE_EVENT_CLASS(xchk_class, ...@@ -103,7 +103,7 @@ DECLARE_EVENT_CLASS(xchk_class,
__entry->flags = sm->sm_flags; __entry->flags = sm->sm_flags;
__entry->error = error; __entry->error = error;
), ),
TP_printk("dev %d:%d ino 0x%llx type %s agno %u inum %llu gen %u flags 0x%x error %d", TP_printk("dev %d:%d ino 0x%llx type %s agno %u inum 0x%llx gen %u flags 0x%x error %d",
MAJOR(__entry->dev), MINOR(__entry->dev), MAJOR(__entry->dev), MINOR(__entry->dev),
__entry->ino, __entry->ino,
__print_symbolic(__entry->type, XFS_SCRUB_TYPE_STRINGS), __print_symbolic(__entry->type, XFS_SCRUB_TYPE_STRINGS),
...@@ -572,7 +572,7 @@ TRACE_EVENT(xchk_iallocbt_check_cluster, ...@@ -572,7 +572,7 @@ TRACE_EVENT(xchk_iallocbt_check_cluster,
__entry->holemask = holemask; __entry->holemask = holemask;
__entry->cluster_ino = cluster_ino; __entry->cluster_ino = cluster_ino;
), ),
TP_printk("dev %d:%d agno %d startino %u daddr 0x%llx len %d chunkino %u nr_inodes %u cluster_mask 0x%x holemask 0x%x cluster_ino %u", TP_printk("dev %d:%d agno %d startino 0x%x daddr 0x%llx len %d chunkino 0x%x nr_inodes %u cluster_mask 0x%x holemask 0x%x cluster_ino 0x%x",
MAJOR(__entry->dev), MINOR(__entry->dev), MAJOR(__entry->dev), MINOR(__entry->dev),
__entry->agno, __entry->agno,
__entry->startino, __entry->startino,
...@@ -842,7 +842,7 @@ TRACE_EVENT(xrep_calc_ag_resblks_btsize, ...@@ -842,7 +842,7 @@ TRACE_EVENT(xrep_calc_ag_resblks_btsize,
__entry->rmapbt_sz = rmapbt_sz; __entry->rmapbt_sz = rmapbt_sz;
__entry->refcbt_sz = refcbt_sz; __entry->refcbt_sz = refcbt_sz;
), ),
TP_printk("dev %d:%d agno %d bno %u ino %u rmap %u refcount %u", TP_printk("dev %d:%d agno %d bnobt %u inobt %u rmapbt %u refcountbt %u",
MAJOR(__entry->dev), MINOR(__entry->dev), MAJOR(__entry->dev), MINOR(__entry->dev),
__entry->agno, __entry->agno,
__entry->bnobt_sz, __entry->bnobt_sz,
...@@ -886,7 +886,7 @@ TRACE_EVENT(xrep_ialloc_insert, ...@@ -886,7 +886,7 @@ TRACE_EVENT(xrep_ialloc_insert,
__entry->freecount = freecount; __entry->freecount = freecount;
__entry->freemask = freemask; __entry->freemask = freemask;
), ),
TP_printk("dev %d:%d agno %d startino %u holemask 0x%x count %u freecount %u freemask 0x%llx", TP_printk("dev %d:%d agno %d startino 0x%x holemask 0x%x count %u freecount %u freemask 0x%llx",
MAJOR(__entry->dev), MINOR(__entry->dev), MAJOR(__entry->dev), MINOR(__entry->dev),
__entry->agno, __entry->agno,
__entry->startino, __entry->startino,
......
...@@ -858,9 +858,12 @@ TRACE_EVENT(xfs_irec_merge_pre, ...@@ -858,9 +858,12 @@ TRACE_EVENT(xfs_irec_merge_pre,
__entry->nagino = nagino; __entry->nagino = nagino;
__entry->nholemask = holemask; __entry->nholemask = holemask;
), ),
TP_printk("dev %d:%d agno %d inobt (%u:0x%x) new (%u:0x%x)", TP_printk("dev %d:%d agno %d agino 0x%x holemask 0x%x new_agino 0x%x new_holemask 0x%x",
MAJOR(__entry->dev), MINOR(__entry->dev), __entry->agno, MAJOR(__entry->dev), MINOR(__entry->dev),
__entry->agino, __entry->holemask, __entry->nagino, __entry->agno,
__entry->agino,
__entry->holemask,
__entry->nagino,
__entry->nholemask) __entry->nholemask)
) )
...@@ -880,8 +883,11 @@ TRACE_EVENT(xfs_irec_merge_post, ...@@ -880,8 +883,11 @@ TRACE_EVENT(xfs_irec_merge_post,
__entry->agino = agino; __entry->agino = agino;
__entry->holemask = holemask; __entry->holemask = holemask;
), ),
TP_printk("dev %d:%d agno %d inobt (%u:0x%x)", MAJOR(__entry->dev), TP_printk("dev %d:%d agno %d agino 0x%x holemask 0x%x",
MINOR(__entry->dev), __entry->agno, __entry->agino, MAJOR(__entry->dev),
MINOR(__entry->dev),
__entry->agno,
__entry->agino,
__entry->holemask) __entry->holemask)
) )
...@@ -3191,7 +3197,7 @@ DECLARE_EVENT_CLASS(xfs_inode_error_class, ...@@ -3191,7 +3197,7 @@ DECLARE_EVENT_CLASS(xfs_inode_error_class,
__entry->error = error; __entry->error = error;
__entry->caller_ip = caller_ip; __entry->caller_ip = caller_ip;
), ),
TP_printk("dev %d:%d ino %llx error %d caller %pS", TP_printk("dev %d:%d ino 0x%llx error %d caller %pS",
MAJOR(__entry->dev), MINOR(__entry->dev), MAJOR(__entry->dev), MINOR(__entry->dev),
__entry->ino, __entry->ino,
__entry->error, __entry->error,
...@@ -3603,7 +3609,7 @@ DECLARE_EVENT_CLASS(xfs_ag_inode_class, ...@@ -3603,7 +3609,7 @@ DECLARE_EVENT_CLASS(xfs_ag_inode_class,
__entry->agno = XFS_INO_TO_AGNO(ip->i_mount, ip->i_ino); __entry->agno = XFS_INO_TO_AGNO(ip->i_mount, ip->i_ino);
__entry->agino = XFS_INO_TO_AGINO(ip->i_mount, ip->i_ino); __entry->agino = XFS_INO_TO_AGINO(ip->i_mount, ip->i_ino);
), ),
TP_printk("dev %d:%d agno %u agino %u", TP_printk("dev %d:%d agno %u agino 0x%x",
MAJOR(__entry->dev), MINOR(__entry->dev), MAJOR(__entry->dev), MINOR(__entry->dev),
__entry->agno, __entry->agino) __entry->agno, __entry->agino)
) )
...@@ -3706,7 +3712,7 @@ TRACE_EVENT(xfs_iwalk_ag, ...@@ -3706,7 +3712,7 @@ TRACE_EVENT(xfs_iwalk_ag,
__entry->agno = agno; __entry->agno = agno;
__entry->startino = startino; __entry->startino = startino;
), ),
TP_printk("dev %d:%d agno %d startino %u", TP_printk("dev %d:%d agno %d startino 0x%x",
MAJOR(__entry->dev), MINOR(__entry->dev), __entry->agno, MAJOR(__entry->dev), MINOR(__entry->dev), __entry->agno,
__entry->startino) __entry->startino)
) )
...@@ -3727,7 +3733,7 @@ TRACE_EVENT(xfs_iwalk_ag_rec, ...@@ -3727,7 +3733,7 @@ TRACE_EVENT(xfs_iwalk_ag_rec,
__entry->startino = irec->ir_startino; __entry->startino = irec->ir_startino;
__entry->freemask = irec->ir_free; __entry->freemask = irec->ir_free;
), ),
TP_printk("dev %d:%d agno %d startino %u freemask 0x%llx", TP_printk("dev %d:%d agno %d startino 0x%x freemask 0x%llx",
MAJOR(__entry->dev), MINOR(__entry->dev), __entry->agno, MAJOR(__entry->dev), MINOR(__entry->dev), __entry->agno,
__entry->startino, __entry->freemask) __entry->startino, __entry->freemask)
) )
...@@ -3790,7 +3796,7 @@ TRACE_EVENT(xfs_check_new_dalign, ...@@ -3790,7 +3796,7 @@ TRACE_EVENT(xfs_check_new_dalign,
__entry->sb_rootino = mp->m_sb.sb_rootino; __entry->sb_rootino = mp->m_sb.sb_rootino;
__entry->calc_rootino = calc_rootino; __entry->calc_rootino = calc_rootino;
), ),
TP_printk("dev %d:%d new_dalign %d sb_rootino %llu calc_rootino %llu", TP_printk("dev %d:%d new_dalign %d sb_rootino 0x%llx calc_rootino 0x%llx",
MAJOR(__entry->dev), MINOR(__entry->dev), MAJOR(__entry->dev), MINOR(__entry->dev),
__entry->new_dalign, __entry->sb_rootino, __entry->new_dalign, __entry->sb_rootino,
__entry->calc_rootino) __entry->calc_rootino)
...@@ -3847,7 +3853,7 @@ TRACE_EVENT(xfs_btree_commit_ifakeroot, ...@@ -3847,7 +3853,7 @@ TRACE_EVENT(xfs_btree_commit_ifakeroot,
__entry->blocks = cur->bc_ino.ifake->if_blocks; __entry->blocks = cur->bc_ino.ifake->if_blocks;
__entry->whichfork = cur->bc_ino.whichfork; __entry->whichfork = cur->bc_ino.whichfork;
), ),
TP_printk("dev %d:%d btree %s ag %u agino %u whichfork %s levels %u blocks %u", TP_printk("dev %d:%d btree %s ag %u agino 0x%x whichfork %s levels %u blocks %u",
MAJOR(__entry->dev), MINOR(__entry->dev), MAJOR(__entry->dev), MINOR(__entry->dev),
__print_symbolic(__entry->btnum, XFS_BTNUM_STRINGS), __print_symbolic(__entry->btnum, XFS_BTNUM_STRINGS),
__entry->agno, __entry->agno,
......
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