diff options
| -rw-r--r-- | fs/xfs/xfs_alloc.c | 5 | ||||
| -rw-r--r-- | fs/xfs/xfs_ialloc.c | 6 | ||||
| -rw-r--r-- | fs/xfs/xfs_trace.h | 25 |
3 files changed, 34 insertions, 2 deletions
diff --git a/fs/xfs/xfs_alloc.c b/fs/xfs/xfs_alloc.c index bcf16528bac5..9eab2dfdcbb5 100644 --- a/fs/xfs/xfs_alloc.c +++ b/fs/xfs/xfs_alloc.c | |||
| @@ -2294,6 +2294,8 @@ xfs_read_agf( | |||
| 2294 | { | 2294 | { |
| 2295 | int error; | 2295 | int error; |
| 2296 | 2296 | ||
| 2297 | trace_xfs_read_agf(mp, agno); | ||
| 2298 | |||
| 2297 | ASSERT(agno != NULLAGNUMBER); | 2299 | ASSERT(agno != NULLAGNUMBER); |
| 2298 | error = xfs_trans_read_buf( | 2300 | error = xfs_trans_read_buf( |
| 2299 | mp, tp, mp->m_ddev_targp, | 2301 | mp, tp, mp->m_ddev_targp, |
| @@ -2324,8 +2326,9 @@ xfs_alloc_read_agf( | |||
| 2324 | struct xfs_perag *pag; /* per allocation group data */ | 2326 | struct xfs_perag *pag; /* per allocation group data */ |
| 2325 | int error; | 2327 | int error; |
| 2326 | 2328 | ||
| 2327 | ASSERT(agno != NULLAGNUMBER); | 2329 | trace_xfs_alloc_read_agf(mp, agno); |
| 2328 | 2330 | ||
| 2331 | ASSERT(agno != NULLAGNUMBER); | ||
| 2329 | error = xfs_read_agf(mp, tp, agno, | 2332 | error = xfs_read_agf(mp, tp, agno, |
| 2330 | (flags & XFS_ALLOC_FLAG_TRYLOCK) ? XBF_TRYLOCK : 0, | 2333 | (flags & XFS_ALLOC_FLAG_TRYLOCK) ? XBF_TRYLOCK : 0, |
| 2331 | bpp); | 2334 | bpp); |
diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c index 14d732f61a41..e87719c5bebe 100644 --- a/fs/xfs/xfs_ialloc.c +++ b/fs/xfs/xfs_ialloc.c | |||
| @@ -40,6 +40,7 @@ | |||
| 40 | #include "xfs_icreate_item.h" | 40 | #include "xfs_icreate_item.h" |
| 41 | #include "xfs_icache.h" | 41 | #include "xfs_icache.h" |
| 42 | #include "xfs_dinode.h" | 42 | #include "xfs_dinode.h" |
| 43 | #include "xfs_trace.h" | ||
| 43 | 44 | ||
| 44 | 45 | ||
| 45 | /* | 46 | /* |
| @@ -1627,8 +1628,9 @@ xfs_read_agi( | |||
| 1627 | { | 1628 | { |
| 1628 | int error; | 1629 | int error; |
| 1629 | 1630 | ||
| 1630 | ASSERT(agno != NULLAGNUMBER); | 1631 | trace_xfs_read_agi(mp, agno); |
| 1631 | 1632 | ||
| 1633 | ASSERT(agno != NULLAGNUMBER); | ||
| 1632 | error = xfs_trans_read_buf(mp, tp, mp->m_ddev_targp, | 1634 | error = xfs_trans_read_buf(mp, tp, mp->m_ddev_targp, |
| 1633 | XFS_AG_DADDR(mp, agno, XFS_AGI_DADDR(mp)), | 1635 | XFS_AG_DADDR(mp, agno, XFS_AGI_DADDR(mp)), |
| 1634 | XFS_FSS_TO_BB(mp, 1), 0, bpp, &xfs_agi_buf_ops); | 1636 | XFS_FSS_TO_BB(mp, 1), 0, bpp, &xfs_agi_buf_ops); |
| @@ -1651,6 +1653,8 @@ xfs_ialloc_read_agi( | |||
| 1651 | struct xfs_perag *pag; /* per allocation group data */ | 1653 | struct xfs_perag *pag; /* per allocation group data */ |
| 1652 | int error; | 1654 | int error; |
| 1653 | 1655 | ||
| 1656 | trace_xfs_ialloc_read_agi(mp, agno); | ||
| 1657 | |||
| 1654 | error = xfs_read_agi(mp, tp, agno, bpp); | 1658 | error = xfs_read_agi(mp, tp, agno, bpp); |
| 1655 | if (error) | 1659 | if (error) |
| 1656 | return error; | 1660 | return error; |
diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h index f195476a037c..425dfa45b9a0 100644 --- a/fs/xfs/xfs_trace.h +++ b/fs/xfs/xfs_trace.h | |||
| @@ -135,6 +135,31 @@ DEFINE_PERAG_REF_EVENT(xfs_perag_clear_reclaim); | |||
| 135 | DEFINE_PERAG_REF_EVENT(xfs_perag_set_eofblocks); | 135 | DEFINE_PERAG_REF_EVENT(xfs_perag_set_eofblocks); |
| 136 | DEFINE_PERAG_REF_EVENT(xfs_perag_clear_eofblocks); | 136 | DEFINE_PERAG_REF_EVENT(xfs_perag_clear_eofblocks); |
| 137 | 137 | ||
| 138 | DECLARE_EVENT_CLASS(xfs_ag_class, | ||
| 139 | TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno), | ||
| 140 | TP_ARGS(mp, agno), | ||
| 141 | TP_STRUCT__entry( | ||
| 142 | __field(dev_t, dev) | ||
| 143 | __field(xfs_agnumber_t, agno) | ||
| 144 | ), | ||
| 145 | TP_fast_assign( | ||
| 146 | __entry->dev = mp->m_super->s_dev; | ||
| 147 | __entry->agno = agno; | ||
| 148 | ), | ||
| 149 | TP_printk("dev %d:%d agno %u", | ||
| 150 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
| 151 | __entry->agno) | ||
| 152 | ); | ||
| 153 | #define DEFINE_AG_EVENT(name) \ | ||
| 154 | DEFINE_EVENT(xfs_ag_class, name, \ | ||
| 155 | TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno), \ | ||
| 156 | TP_ARGS(mp, agno)) | ||
| 157 | |||
| 158 | DEFINE_AG_EVENT(xfs_read_agf); | ||
| 159 | DEFINE_AG_EVENT(xfs_alloc_read_agf); | ||
| 160 | DEFINE_AG_EVENT(xfs_read_agi); | ||
| 161 | DEFINE_AG_EVENT(xfs_ialloc_read_agi); | ||
| 162 | |||
| 138 | TRACE_EVENT(xfs_attr_list_node_descend, | 163 | TRACE_EVENT(xfs_attr_list_node_descend, |
| 139 | TP_PROTO(struct xfs_attr_list_context *ctx, | 164 | TP_PROTO(struct xfs_attr_list_context *ctx, |
| 140 | struct xfs_da_node_entry *btree), | 165 | struct xfs_da_node_entry *btree), |
