Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

xfs: icreate log item recovery and cancellation tracepoints

Various log items have recovery tracepoints to identify whether a
particular log item is recovered or cancelled. Add the equivalent
tracepoints for the icreate transaction.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>

authored by

Brian Foster and committed by
Dave Chinner
78d57e45 f0b2efad

+38 -1
+4 -1
fs/xfs/xfs_log_recover.c
··· 3100 3100 * done easily. 3101 3101 */ 3102 3102 if (xlog_check_buffer_cancelled(log, 3103 - XFS_AGB_TO_DADDR(mp, agno, agbno), length, 0)) 3103 + XFS_AGB_TO_DADDR(mp, agno, agbno), length, 0)) { 3104 + trace_xfs_log_recover_icreate_cancel(log, icl); 3104 3105 return 0; 3106 + } 3105 3107 3108 + trace_xfs_log_recover_icreate_recover(log, icl); 3106 3109 xfs_ialloc_inode_init(mp, NULL, buffer_list, count, agno, agbno, length, 3107 3110 be32_to_cpu(icl->icl_gen)); 3108 3111 return 0;
+34
fs/xfs/xfs_trace.h
··· 2089 2089 DEFINE_LOG_RECOVER_INO_ITEM(xfs_log_recover_inode_cancel); 2090 2090 DEFINE_LOG_RECOVER_INO_ITEM(xfs_log_recover_inode_skip); 2091 2091 2092 + DECLARE_EVENT_CLASS(xfs_log_recover_icreate_item_class, 2093 + TP_PROTO(struct xlog *log, struct xfs_icreate_log *in_f), 2094 + TP_ARGS(log, in_f), 2095 + TP_STRUCT__entry( 2096 + __field(dev_t, dev) 2097 + __field(xfs_agnumber_t, agno) 2098 + __field(xfs_agblock_t, agbno) 2099 + __field(unsigned int, count) 2100 + __field(unsigned int, isize) 2101 + __field(xfs_agblock_t, length) 2102 + __field(unsigned int, gen) 2103 + ), 2104 + TP_fast_assign( 2105 + __entry->dev = log->l_mp->m_super->s_dev; 2106 + __entry->agno = be32_to_cpu(in_f->icl_ag); 2107 + __entry->agbno = be32_to_cpu(in_f->icl_agbno); 2108 + __entry->count = be32_to_cpu(in_f->icl_count); 2109 + __entry->isize = be32_to_cpu(in_f->icl_isize); 2110 + __entry->length = be32_to_cpu(in_f->icl_length); 2111 + __entry->gen = be32_to_cpu(in_f->icl_gen); 2112 + ), 2113 + TP_printk("dev %d:%d agno %u agbno %u count %u isize %u length %u " 2114 + "gen %u", MAJOR(__entry->dev), MINOR(__entry->dev), 2115 + __entry->agno, __entry->agbno, __entry->count, __entry->isize, 2116 + __entry->length, __entry->gen) 2117 + ) 2118 + #define DEFINE_LOG_RECOVER_ICREATE_ITEM(name) \ 2119 + DEFINE_EVENT(xfs_log_recover_icreate_item_class, name, \ 2120 + TP_PROTO(struct xlog *log, struct xfs_icreate_log *in_f), \ 2121 + TP_ARGS(log, in_f)) 2122 + 2123 + DEFINE_LOG_RECOVER_ICREATE_ITEM(xfs_log_recover_icreate_cancel); 2124 + DEFINE_LOG_RECOVER_ICREATE_ITEM(xfs_log_recover_icreate_recover); 2125 + 2092 2126 DECLARE_EVENT_CLASS(xfs_discard_class, 2093 2127 TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, 2094 2128 xfs_agblock_t agbno, xfs_extlen_t len),