xfs: create simplified inode walk function
Create a new iterator function to simplify walking inodes in an XFS filesystem. This new iterator will replace the existing open-coded walking that goes on in various places. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
This commit is contained in:
@@ -3517,6 +3517,46 @@ DEFINE_EVENT(xfs_inode_corrupt_class, name, \
|
||||
DEFINE_INODE_CORRUPT_EVENT(xfs_inode_mark_sick);
|
||||
DEFINE_INODE_CORRUPT_EVENT(xfs_inode_mark_healthy);
|
||||
|
||||
TRACE_EVENT(xfs_iwalk_ag,
|
||||
TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
|
||||
xfs_agino_t startino),
|
||||
TP_ARGS(mp, agno, startino),
|
||||
TP_STRUCT__entry(
|
||||
__field(dev_t, dev)
|
||||
__field(xfs_agnumber_t, agno)
|
||||
__field(xfs_agino_t, startino)
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->dev = mp->m_super->s_dev;
|
||||
__entry->agno = agno;
|
||||
__entry->startino = startino;
|
||||
),
|
||||
TP_printk("dev %d:%d agno %d startino %u",
|
||||
MAJOR(__entry->dev), MINOR(__entry->dev), __entry->agno,
|
||||
__entry->startino)
|
||||
)
|
||||
|
||||
TRACE_EVENT(xfs_iwalk_ag_rec,
|
||||
TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
|
||||
struct xfs_inobt_rec_incore *irec),
|
||||
TP_ARGS(mp, agno, irec),
|
||||
TP_STRUCT__entry(
|
||||
__field(dev_t, dev)
|
||||
__field(xfs_agnumber_t, agno)
|
||||
__field(xfs_agino_t, startino)
|
||||
__field(uint64_t, freemask)
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->dev = mp->m_super->s_dev;
|
||||
__entry->agno = agno;
|
||||
__entry->startino = irec->ir_startino;
|
||||
__entry->freemask = irec->ir_free;
|
||||
),
|
||||
TP_printk("dev %d:%d agno %d startino %u freemask 0x%llx",
|
||||
MAJOR(__entry->dev), MINOR(__entry->dev), __entry->agno,
|
||||
__entry->startino, __entry->freemask)
|
||||
)
|
||||
|
||||
#endif /* _TRACE_XFS_H */
|
||||
|
||||
#undef TRACE_INCLUDE_PATH
|
||||
|
Reference in New Issue
Block a user