Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    1) // SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    3)  * Copyright (c) 2009, Christoph Hellwig
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    4)  * All Rights Reserved.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    5)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    6) #undef TRACE_SYSTEM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    7) #define TRACE_SYSTEM xfs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    8) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    9) #if !defined(_TRACE_XFS_H) || defined(TRACE_HEADER_MULTI_READ)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   10) #define _TRACE_XFS_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   11) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   12) #include <linux/tracepoint.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   13) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   14) struct xfs_agf;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   15) struct xfs_alloc_arg;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   16) struct xfs_attr_list_context;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   17) struct xfs_buf_log_item;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   18) struct xfs_da_args;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   19) struct xfs_da_node_entry;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   20) struct xfs_dquot;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   21) struct xfs_log_item;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   22) struct xlog;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   23) struct xlog_ticket;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   24) struct xlog_recover;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   25) struct xlog_recover_item;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   26) struct xlog_rec_header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   27) struct xfs_buf_log_format;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   28) struct xfs_inode_log_format;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   29) struct xfs_bmbt_irec;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   30) struct xfs_btree_cur;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   31) struct xfs_refcount_irec;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   32) struct xfs_fsmap;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   33) struct xfs_rmap_irec;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   34) struct xfs_icreate_log;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   35) struct xfs_owner_info;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   36) struct xfs_trans_res;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   37) struct xfs_inobt_rec_incore;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   38) union xfs_btree_ptr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   39) struct xfs_dqtrx;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   40) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   41) #define XFS_ATTR_FILTER_FLAGS \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   42) 	{ XFS_ATTR_ROOT,	"ROOT" }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   43) 	{ XFS_ATTR_SECURE,	"SECURE" }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   44) 	{ XFS_ATTR_INCOMPLETE,	"INCOMPLETE" }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   45) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   46) DECLARE_EVENT_CLASS(xfs_attr_list_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   47) 	TP_PROTO(struct xfs_attr_list_context *ctx),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   48) 	TP_ARGS(ctx),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   49) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   50) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   51) 		__field(xfs_ino_t, ino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   52) 		__field(u32, hashval)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   53) 		__field(u32, blkno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   54) 		__field(u32, offset)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   55) 		__field(void *, buffer)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   56) 		__field(int, bufsize)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   57) 		__field(int, count)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   58) 		__field(int, firstu)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   59) 		__field(int, dupcnt)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   60) 		__field(unsigned int, attr_filter)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   61) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   62) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   63) 		__entry->dev = VFS_I(ctx->dp)->i_sb->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   64) 		__entry->ino = ctx->dp->i_ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   65) 		__entry->hashval = ctx->cursor.hashval;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   66) 		__entry->blkno = ctx->cursor.blkno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   67) 		__entry->offset = ctx->cursor.offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   68) 		__entry->buffer = ctx->buffer;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   69) 		__entry->bufsize = ctx->bufsize;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   70) 		__entry->count = ctx->count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   71) 		__entry->firstu = ctx->firstu;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   72) 		__entry->attr_filter = ctx->attr_filter;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   73) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   74) 	TP_printk("dev %d:%d ino 0x%llx cursor h/b/o 0x%x/0x%x/%u dupcnt %u "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   75) 		  "buffer %p size %u count %u firstu %u filter %s",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   76) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   77) 		   __entry->ino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   78) 		   __entry->hashval,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   79) 		   __entry->blkno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   80) 		   __entry->offset,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   81) 		   __entry->dupcnt,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   82) 		   __entry->buffer,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   83) 		   __entry->bufsize,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   84) 		   __entry->count,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   85) 		   __entry->firstu,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   86) 		   __print_flags(__entry->attr_filter, "|",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   87) 				 XFS_ATTR_FILTER_FLAGS)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   88) 	)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   89) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   90) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   91) #define DEFINE_ATTR_LIST_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   92) DEFINE_EVENT(xfs_attr_list_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   93) 	TP_PROTO(struct xfs_attr_list_context *ctx), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   94) 	TP_ARGS(ctx))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   95) DEFINE_ATTR_LIST_EVENT(xfs_attr_list_sf);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   96) DEFINE_ATTR_LIST_EVENT(xfs_attr_list_sf_all);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   97) DEFINE_ATTR_LIST_EVENT(xfs_attr_list_leaf);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   98) DEFINE_ATTR_LIST_EVENT(xfs_attr_list_leaf_end);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   99) DEFINE_ATTR_LIST_EVENT(xfs_attr_list_full);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  100) DEFINE_ATTR_LIST_EVENT(xfs_attr_list_add);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  101) DEFINE_ATTR_LIST_EVENT(xfs_attr_list_wrong_blk);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  102) DEFINE_ATTR_LIST_EVENT(xfs_attr_list_notfound);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  103) DEFINE_ATTR_LIST_EVENT(xfs_attr_leaf_list);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  104) DEFINE_ATTR_LIST_EVENT(xfs_attr_node_list);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  105) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  106) DECLARE_EVENT_CLASS(xfs_perag_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  107) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, int refcount,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  108) 		 unsigned long caller_ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  109) 	TP_ARGS(mp, agno, refcount, caller_ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  110) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  111) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  112) 		__field(xfs_agnumber_t, agno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  113) 		__field(int, refcount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  114) 		__field(unsigned long, caller_ip)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  115) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  116) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  117) 		__entry->dev = mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  118) 		__entry->agno = agno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  119) 		__entry->refcount = refcount;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  120) 		__entry->caller_ip = caller_ip;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  121) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  122) 	TP_printk("dev %d:%d agno %u refcount %d caller %pS",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  123) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  124) 		  __entry->agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  125) 		  __entry->refcount,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  126) 		  (char *)__entry->caller_ip)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  127) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  128) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  129) #define DEFINE_PERAG_REF_EVENT(name)	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  130) DEFINE_EVENT(xfs_perag_class, name,	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  131) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, int refcount,	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  132) 		 unsigned long caller_ip),					\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  133) 	TP_ARGS(mp, agno, refcount, caller_ip))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  134) DEFINE_PERAG_REF_EVENT(xfs_perag_get);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  135) DEFINE_PERAG_REF_EVENT(xfs_perag_get_tag);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  136) DEFINE_PERAG_REF_EVENT(xfs_perag_put);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  137) DEFINE_PERAG_REF_EVENT(xfs_perag_set_reclaim);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  138) DEFINE_PERAG_REF_EVENT(xfs_perag_clear_reclaim);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  139) DEFINE_PERAG_REF_EVENT(xfs_perag_set_eofblocks);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  140) DEFINE_PERAG_REF_EVENT(xfs_perag_clear_eofblocks);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  141) DEFINE_PERAG_REF_EVENT(xfs_perag_set_cowblocks);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  142) DEFINE_PERAG_REF_EVENT(xfs_perag_clear_cowblocks);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  143) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  144) DECLARE_EVENT_CLASS(xfs_ag_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  145) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  146) 	TP_ARGS(mp, agno),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  147) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  148) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  149) 		__field(xfs_agnumber_t, agno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  150) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  151) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  152) 		__entry->dev = mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  153) 		__entry->agno = agno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  154) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  155) 	TP_printk("dev %d:%d agno %u",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  156) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  157) 		  __entry->agno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  158) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  159) #define DEFINE_AG_EVENT(name)	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  160) DEFINE_EVENT(xfs_ag_class, name,	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  161) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno),	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  162) 	TP_ARGS(mp, agno))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  163) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  164) DEFINE_AG_EVENT(xfs_read_agf);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  165) DEFINE_AG_EVENT(xfs_alloc_read_agf);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  166) DEFINE_AG_EVENT(xfs_read_agi);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  167) DEFINE_AG_EVENT(xfs_ialloc_read_agi);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  168) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  169) TRACE_EVENT(xfs_attr_list_node_descend,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  170) 	TP_PROTO(struct xfs_attr_list_context *ctx,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  171) 		 struct xfs_da_node_entry *btree),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  172) 	TP_ARGS(ctx, btree),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  173) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  174) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  175) 		__field(xfs_ino_t, ino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  176) 		__field(u32, hashval)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  177) 		__field(u32, blkno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  178) 		__field(u32, offset)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  179) 		__field(void *, buffer)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  180) 		__field(int, bufsize)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  181) 		__field(int, count)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  182) 		__field(int, firstu)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  183) 		__field(int, dupcnt)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  184) 		__field(unsigned int, attr_filter)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  185) 		__field(u32, bt_hashval)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  186) 		__field(u32, bt_before)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  187) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  188) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  189) 		__entry->dev = VFS_I(ctx->dp)->i_sb->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  190) 		__entry->ino = ctx->dp->i_ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  191) 		__entry->hashval = ctx->cursor.hashval;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  192) 		__entry->blkno = ctx->cursor.blkno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  193) 		__entry->offset = ctx->cursor.offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  194) 		__entry->buffer = ctx->buffer;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  195) 		__entry->bufsize = ctx->bufsize;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  196) 		__entry->count = ctx->count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  197) 		__entry->firstu = ctx->firstu;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  198) 		__entry->attr_filter = ctx->attr_filter;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  199) 		__entry->bt_hashval = be32_to_cpu(btree->hashval);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  200) 		__entry->bt_before = be32_to_cpu(btree->before);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  201) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  202) 	TP_printk("dev %d:%d ino 0x%llx cursor h/b/o 0x%x/0x%x/%u dupcnt %u "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  203) 		  "buffer %p size %u count %u firstu %u filter %s "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  204) 		  "node hashval %u, node before %u",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  205) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  206) 		   __entry->ino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  207) 		   __entry->hashval,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  208) 		   __entry->blkno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  209) 		   __entry->offset,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  210) 		   __entry->dupcnt,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  211) 		   __entry->buffer,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  212) 		   __entry->bufsize,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  213) 		   __entry->count,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  214) 		   __entry->firstu,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  215) 		   __print_flags(__entry->attr_filter, "|",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  216) 				 XFS_ATTR_FILTER_FLAGS),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  217) 		   __entry->bt_hashval,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  218) 		   __entry->bt_before)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  219) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  220) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  221) DECLARE_EVENT_CLASS(xfs_bmap_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  222) 	TP_PROTO(struct xfs_inode *ip, struct xfs_iext_cursor *cur, int state,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  223) 		 unsigned long caller_ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  224) 	TP_ARGS(ip, cur, state, caller_ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  225) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  226) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  227) 		__field(xfs_ino_t, ino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  228) 		__field(void *, leaf)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  229) 		__field(int, pos)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  230) 		__field(xfs_fileoff_t, startoff)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  231) 		__field(xfs_fsblock_t, startblock)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  232) 		__field(xfs_filblks_t, blockcount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  233) 		__field(xfs_exntst_t, state)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  234) 		__field(int, bmap_state)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  235) 		__field(unsigned long, caller_ip)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  236) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  237) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  238) 		struct xfs_ifork	*ifp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  239) 		struct xfs_bmbt_irec	r;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  240) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  241) 		ifp = xfs_iext_state_to_fork(ip, state);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  242) 		xfs_iext_get_extent(ifp, cur, &r);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  243) 		__entry->dev = VFS_I(ip)->i_sb->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  244) 		__entry->ino = ip->i_ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  245) 		__entry->leaf = cur->leaf;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  246) 		__entry->pos = cur->pos;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  247) 		__entry->startoff = r.br_startoff;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  248) 		__entry->startblock = r.br_startblock;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  249) 		__entry->blockcount = r.br_blockcount;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  250) 		__entry->state = r.br_state;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  251) 		__entry->bmap_state = state;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  252) 		__entry->caller_ip = caller_ip;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  253) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  254) 	TP_printk("dev %d:%d ino 0x%llx state %s cur %p/%d "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  255) 		  "offset %lld block %lld count %lld flag %d caller %pS",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  256) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  257) 		  __entry->ino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  258) 		  __print_flags(__entry->bmap_state, "|", XFS_BMAP_EXT_FLAGS),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  259) 		  __entry->leaf,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  260) 		  __entry->pos,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  261) 		  __entry->startoff,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  262) 		  (int64_t)__entry->startblock,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  263) 		  __entry->blockcount,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  264) 		  __entry->state,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  265) 		  (char *)__entry->caller_ip)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  266) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  267) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  268) #define DEFINE_BMAP_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  269) DEFINE_EVENT(xfs_bmap_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  270) 	TP_PROTO(struct xfs_inode *ip, struct xfs_iext_cursor *cur, int state, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  271) 		 unsigned long caller_ip), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  272) 	TP_ARGS(ip, cur, state, caller_ip))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  273) DEFINE_BMAP_EVENT(xfs_iext_insert);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  274) DEFINE_BMAP_EVENT(xfs_iext_remove);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  275) DEFINE_BMAP_EVENT(xfs_bmap_pre_update);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  276) DEFINE_BMAP_EVENT(xfs_bmap_post_update);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  277) DEFINE_BMAP_EVENT(xfs_read_extent);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  278) DEFINE_BMAP_EVENT(xfs_write_extent);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  279) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  280) DECLARE_EVENT_CLASS(xfs_buf_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  281) 	TP_PROTO(struct xfs_buf *bp, unsigned long caller_ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  282) 	TP_ARGS(bp, caller_ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  283) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  284) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  285) 		__field(xfs_daddr_t, bno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  286) 		__field(int, nblks)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  287) 		__field(int, hold)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  288) 		__field(int, pincount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  289) 		__field(unsigned, lockval)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  290) 		__field(unsigned, flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  291) 		__field(unsigned long, caller_ip)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  292) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  293) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  294) 		__entry->dev = bp->b_target->bt_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  295) 		if (bp->b_bn == XFS_BUF_DADDR_NULL)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  296) 			__entry->bno = bp->b_maps[0].bm_bn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  297) 		else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  298) 			__entry->bno = bp->b_bn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  299) 		__entry->nblks = bp->b_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  300) 		__entry->hold = atomic_read(&bp->b_hold);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  301) 		__entry->pincount = atomic_read(&bp->b_pin_count);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  302) 		__entry->lockval = bp->b_sema.count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  303) 		__entry->flags = bp->b_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  304) 		__entry->caller_ip = caller_ip;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  305) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  306) 	TP_printk("dev %d:%d bno 0x%llx nblks 0x%x hold %d pincount %d "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  307) 		  "lock %d flags %s caller %pS",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  308) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  309) 		  (unsigned long long)__entry->bno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  310) 		  __entry->nblks,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  311) 		  __entry->hold,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  312) 		  __entry->pincount,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  313) 		  __entry->lockval,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  314) 		  __print_flags(__entry->flags, "|", XFS_BUF_FLAGS),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  315) 		  (void *)__entry->caller_ip)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  316) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  317) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  318) #define DEFINE_BUF_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  319) DEFINE_EVENT(xfs_buf_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  320) 	TP_PROTO(struct xfs_buf *bp, unsigned long caller_ip), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  321) 	TP_ARGS(bp, caller_ip))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  322) DEFINE_BUF_EVENT(xfs_buf_init);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  323) DEFINE_BUF_EVENT(xfs_buf_free);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  324) DEFINE_BUF_EVENT(xfs_buf_hold);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  325) DEFINE_BUF_EVENT(xfs_buf_rele);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  326) DEFINE_BUF_EVENT(xfs_buf_iodone);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  327) DEFINE_BUF_EVENT(xfs_buf_submit);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  328) DEFINE_BUF_EVENT(xfs_buf_lock);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  329) DEFINE_BUF_EVENT(xfs_buf_lock_done);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  330) DEFINE_BUF_EVENT(xfs_buf_trylock_fail);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  331) DEFINE_BUF_EVENT(xfs_buf_trylock);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  332) DEFINE_BUF_EVENT(xfs_buf_unlock);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  333) DEFINE_BUF_EVENT(xfs_buf_iowait);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  334) DEFINE_BUF_EVENT(xfs_buf_iowait_done);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  335) DEFINE_BUF_EVENT(xfs_buf_delwri_queue);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  336) DEFINE_BUF_EVENT(xfs_buf_delwri_queued);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  337) DEFINE_BUF_EVENT(xfs_buf_delwri_split);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  338) DEFINE_BUF_EVENT(xfs_buf_delwri_pushbuf);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  339) DEFINE_BUF_EVENT(xfs_buf_get_uncached);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  340) DEFINE_BUF_EVENT(xfs_buf_item_relse);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  341) DEFINE_BUF_EVENT(xfs_buf_iodone_async);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  342) DEFINE_BUF_EVENT(xfs_buf_error_relse);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  343) DEFINE_BUF_EVENT(xfs_buf_wait_buftarg);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  344) DEFINE_BUF_EVENT(xfs_trans_read_buf_shut);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  345) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  346) /* not really buffer traces, but the buf provides useful information */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  347) DEFINE_BUF_EVENT(xfs_btree_corrupt);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  348) DEFINE_BUF_EVENT(xfs_reset_dqcounts);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  349) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  350) /* pass flags explicitly */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  351) DECLARE_EVENT_CLASS(xfs_buf_flags_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  352) 	TP_PROTO(struct xfs_buf *bp, unsigned flags, unsigned long caller_ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  353) 	TP_ARGS(bp, flags, caller_ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  354) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  355) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  356) 		__field(xfs_daddr_t, bno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  357) 		__field(size_t, buffer_length)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  358) 		__field(int, hold)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  359) 		__field(int, pincount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  360) 		__field(unsigned, lockval)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  361) 		__field(unsigned, flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  362) 		__field(unsigned long, caller_ip)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  363) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  364) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  365) 		__entry->dev = bp->b_target->bt_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  366) 		__entry->bno = bp->b_bn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  367) 		__entry->buffer_length = BBTOB(bp->b_length);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  368) 		__entry->flags = flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  369) 		__entry->hold = atomic_read(&bp->b_hold);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  370) 		__entry->pincount = atomic_read(&bp->b_pin_count);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  371) 		__entry->lockval = bp->b_sema.count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  372) 		__entry->caller_ip = caller_ip;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  373) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  374) 	TP_printk("dev %d:%d bno 0x%llx len 0x%zx hold %d pincount %d "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  375) 		  "lock %d flags %s caller %pS",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  376) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  377) 		  (unsigned long long)__entry->bno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  378) 		  __entry->buffer_length,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  379) 		  __entry->hold,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  380) 		  __entry->pincount,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  381) 		  __entry->lockval,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  382) 		  __print_flags(__entry->flags, "|", XFS_BUF_FLAGS),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  383) 		  (void *)__entry->caller_ip)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  384) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  385) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  386) #define DEFINE_BUF_FLAGS_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  387) DEFINE_EVENT(xfs_buf_flags_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  388) 	TP_PROTO(struct xfs_buf *bp, unsigned flags, unsigned long caller_ip), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  389) 	TP_ARGS(bp, flags, caller_ip))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  390) DEFINE_BUF_FLAGS_EVENT(xfs_buf_find);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  391) DEFINE_BUF_FLAGS_EVENT(xfs_buf_get);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  392) DEFINE_BUF_FLAGS_EVENT(xfs_buf_read);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  393) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  394) TRACE_EVENT(xfs_buf_ioerror,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  395) 	TP_PROTO(struct xfs_buf *bp, int error, xfs_failaddr_t caller_ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  396) 	TP_ARGS(bp, error, caller_ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  397) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  398) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  399) 		__field(xfs_daddr_t, bno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  400) 		__field(size_t, buffer_length)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  401) 		__field(unsigned, flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  402) 		__field(int, hold)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  403) 		__field(int, pincount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  404) 		__field(unsigned, lockval)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  405) 		__field(int, error)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  406) 		__field(xfs_failaddr_t, caller_ip)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  407) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  408) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  409) 		__entry->dev = bp->b_target->bt_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  410) 		__entry->bno = bp->b_bn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  411) 		__entry->buffer_length = BBTOB(bp->b_length);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  412) 		__entry->hold = atomic_read(&bp->b_hold);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  413) 		__entry->pincount = atomic_read(&bp->b_pin_count);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  414) 		__entry->lockval = bp->b_sema.count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  415) 		__entry->error = error;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  416) 		__entry->flags = bp->b_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  417) 		__entry->caller_ip = caller_ip;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  418) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  419) 	TP_printk("dev %d:%d bno 0x%llx len 0x%zx hold %d pincount %d "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  420) 		  "lock %d error %d flags %s caller %pS",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  421) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  422) 		  (unsigned long long)__entry->bno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  423) 		  __entry->buffer_length,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  424) 		  __entry->hold,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  425) 		  __entry->pincount,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  426) 		  __entry->lockval,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  427) 		  __entry->error,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  428) 		  __print_flags(__entry->flags, "|", XFS_BUF_FLAGS),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  429) 		  (void *)__entry->caller_ip)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  430) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  431) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  432) DECLARE_EVENT_CLASS(xfs_buf_item_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  433) 	TP_PROTO(struct xfs_buf_log_item *bip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  434) 	TP_ARGS(bip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  435) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  436) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  437) 		__field(xfs_daddr_t, buf_bno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  438) 		__field(size_t, buf_len)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  439) 		__field(int, buf_hold)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  440) 		__field(int, buf_pincount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  441) 		__field(int, buf_lockval)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  442) 		__field(unsigned, buf_flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  443) 		__field(unsigned, bli_recur)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  444) 		__field(int, bli_refcount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  445) 		__field(unsigned, bli_flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  446) 		__field(unsigned long, li_flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  447) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  448) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  449) 		__entry->dev = bip->bli_buf->b_target->bt_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  450) 		__entry->bli_flags = bip->bli_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  451) 		__entry->bli_recur = bip->bli_recur;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  452) 		__entry->bli_refcount = atomic_read(&bip->bli_refcount);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  453) 		__entry->buf_bno = bip->bli_buf->b_bn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  454) 		__entry->buf_len = BBTOB(bip->bli_buf->b_length);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  455) 		__entry->buf_flags = bip->bli_buf->b_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  456) 		__entry->buf_hold = atomic_read(&bip->bli_buf->b_hold);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  457) 		__entry->buf_pincount = atomic_read(&bip->bli_buf->b_pin_count);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  458) 		__entry->buf_lockval = bip->bli_buf->b_sema.count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  459) 		__entry->li_flags = bip->bli_item.li_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  460) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  461) 	TP_printk("dev %d:%d bno 0x%llx len 0x%zx hold %d pincount %d "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  462) 		  "lock %d flags %s recur %d refcount %d bliflags %s "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  463) 		  "liflags %s",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  464) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  465) 		  (unsigned long long)__entry->buf_bno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  466) 		  __entry->buf_len,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  467) 		  __entry->buf_hold,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  468) 		  __entry->buf_pincount,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  469) 		  __entry->buf_lockval,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  470) 		  __print_flags(__entry->buf_flags, "|", XFS_BUF_FLAGS),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  471) 		  __entry->bli_recur,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  472) 		  __entry->bli_refcount,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  473) 		  __print_flags(__entry->bli_flags, "|", XFS_BLI_FLAGS),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  474) 		  __print_flags(__entry->li_flags, "|", XFS_LI_FLAGS))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  475) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  476) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  477) #define DEFINE_BUF_ITEM_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  478) DEFINE_EVENT(xfs_buf_item_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  479) 	TP_PROTO(struct xfs_buf_log_item *bip), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  480) 	TP_ARGS(bip))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  481) DEFINE_BUF_ITEM_EVENT(xfs_buf_item_size);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  482) DEFINE_BUF_ITEM_EVENT(xfs_buf_item_size_ordered);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  483) DEFINE_BUF_ITEM_EVENT(xfs_buf_item_size_stale);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  484) DEFINE_BUF_ITEM_EVENT(xfs_buf_item_format);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  485) DEFINE_BUF_ITEM_EVENT(xfs_buf_item_format_stale);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  486) DEFINE_BUF_ITEM_EVENT(xfs_buf_item_ordered);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  487) DEFINE_BUF_ITEM_EVENT(xfs_buf_item_pin);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  488) DEFINE_BUF_ITEM_EVENT(xfs_buf_item_unpin);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  489) DEFINE_BUF_ITEM_EVENT(xfs_buf_item_unpin_stale);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  490) DEFINE_BUF_ITEM_EVENT(xfs_buf_item_release);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  491) DEFINE_BUF_ITEM_EVENT(xfs_buf_item_committed);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  492) DEFINE_BUF_ITEM_EVENT(xfs_buf_item_push);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  493) DEFINE_BUF_ITEM_EVENT(xfs_trans_get_buf);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  494) DEFINE_BUF_ITEM_EVENT(xfs_trans_get_buf_recur);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  495) DEFINE_BUF_ITEM_EVENT(xfs_trans_getsb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  496) DEFINE_BUF_ITEM_EVENT(xfs_trans_getsb_recur);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  497) DEFINE_BUF_ITEM_EVENT(xfs_trans_read_buf);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  498) DEFINE_BUF_ITEM_EVENT(xfs_trans_read_buf_recur);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  499) DEFINE_BUF_ITEM_EVENT(xfs_trans_log_buf);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  500) DEFINE_BUF_ITEM_EVENT(xfs_trans_brelse);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  501) DEFINE_BUF_ITEM_EVENT(xfs_trans_bjoin);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  502) DEFINE_BUF_ITEM_EVENT(xfs_trans_bhold);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  503) DEFINE_BUF_ITEM_EVENT(xfs_trans_bhold_release);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  504) DEFINE_BUF_ITEM_EVENT(xfs_trans_binval);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  505) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  506) DECLARE_EVENT_CLASS(xfs_filestream_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  507) 	TP_PROTO(struct xfs_mount *mp, xfs_ino_t ino, xfs_agnumber_t agno),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  508) 	TP_ARGS(mp, ino, agno),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  509) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  510) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  511) 		__field(xfs_ino_t, ino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  512) 		__field(xfs_agnumber_t, agno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  513) 		__field(int, streams)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  514) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  515) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  516) 		__entry->dev = mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  517) 		__entry->ino = ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  518) 		__entry->agno = agno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  519) 		__entry->streams = xfs_filestream_peek_ag(mp, agno);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  520) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  521) 	TP_printk("dev %d:%d ino 0x%llx agno %u streams %d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  522) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  523) 		  __entry->ino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  524) 		  __entry->agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  525) 		  __entry->streams)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  526) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  527) #define DEFINE_FILESTREAM_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  528) DEFINE_EVENT(xfs_filestream_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  529) 	TP_PROTO(struct xfs_mount *mp, xfs_ino_t ino, xfs_agnumber_t agno), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  530) 	TP_ARGS(mp, ino, agno))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  531) DEFINE_FILESTREAM_EVENT(xfs_filestream_free);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  532) DEFINE_FILESTREAM_EVENT(xfs_filestream_lookup);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  533) DEFINE_FILESTREAM_EVENT(xfs_filestream_scan);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  534) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  535) TRACE_EVENT(xfs_filestream_pick,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  536) 	TP_PROTO(struct xfs_inode *ip, xfs_agnumber_t agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  537) 		 xfs_extlen_t free, int nscan),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  538) 	TP_ARGS(ip, agno, free, nscan),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  539) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  540) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  541) 		__field(xfs_ino_t, ino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  542) 		__field(xfs_agnumber_t, agno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  543) 		__field(int, streams)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  544) 		__field(xfs_extlen_t, free)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  545) 		__field(int, nscan)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  546) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  547) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  548) 		__entry->dev = VFS_I(ip)->i_sb->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  549) 		__entry->ino = ip->i_ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  550) 		__entry->agno = agno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  551) 		__entry->streams = xfs_filestream_peek_ag(ip->i_mount, agno);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  552) 		__entry->free = free;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  553) 		__entry->nscan = nscan;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  554) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  555) 	TP_printk("dev %d:%d ino 0x%llx agno %u streams %d free %d nscan %d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  556) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  557) 		  __entry->ino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  558) 		  __entry->agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  559) 		  __entry->streams,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  560) 		  __entry->free,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  561) 		  __entry->nscan)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  562) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  563) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  564) DECLARE_EVENT_CLASS(xfs_lock_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  565) 	TP_PROTO(struct xfs_inode *ip, unsigned lock_flags,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  566) 		 unsigned long caller_ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  567) 	TP_ARGS(ip,  lock_flags, caller_ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  568) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  569) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  570) 		__field(xfs_ino_t, ino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  571) 		__field(int, lock_flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  572) 		__field(unsigned long, caller_ip)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  573) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  574) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  575) 		__entry->dev = VFS_I(ip)->i_sb->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  576) 		__entry->ino = ip->i_ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  577) 		__entry->lock_flags = lock_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  578) 		__entry->caller_ip = caller_ip;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  579) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  580) 	TP_printk("dev %d:%d ino 0x%llx flags %s caller %pS",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  581) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  582) 		  __entry->ino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  583) 		  __print_flags(__entry->lock_flags, "|", XFS_LOCK_FLAGS),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  584) 		  (void *)__entry->caller_ip)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  585) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  586) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  587) #define DEFINE_LOCK_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  588) DEFINE_EVENT(xfs_lock_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  589) 	TP_PROTO(struct xfs_inode *ip, unsigned lock_flags, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  590) 		 unsigned long caller_ip), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  591) 	TP_ARGS(ip,  lock_flags, caller_ip))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  592) DEFINE_LOCK_EVENT(xfs_ilock);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  593) DEFINE_LOCK_EVENT(xfs_ilock_nowait);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  594) DEFINE_LOCK_EVENT(xfs_ilock_demote);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  595) DEFINE_LOCK_EVENT(xfs_iunlock);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  596) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  597) DECLARE_EVENT_CLASS(xfs_inode_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  598) 	TP_PROTO(struct xfs_inode *ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  599) 	TP_ARGS(ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  600) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  601) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  602) 		__field(xfs_ino_t, ino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  603) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  604) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  605) 		__entry->dev = VFS_I(ip)->i_sb->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  606) 		__entry->ino = ip->i_ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  607) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  608) 	TP_printk("dev %d:%d ino 0x%llx",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  609) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  610) 		  __entry->ino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  611) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  612) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  613) #define DEFINE_INODE_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  614) DEFINE_EVENT(xfs_inode_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  615) 	TP_PROTO(struct xfs_inode *ip), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  616) 	TP_ARGS(ip))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  617) DEFINE_INODE_EVENT(xfs_iget_skip);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  618) DEFINE_INODE_EVENT(xfs_iget_reclaim);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  619) DEFINE_INODE_EVENT(xfs_iget_reclaim_fail);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  620) DEFINE_INODE_EVENT(xfs_iget_hit);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  621) DEFINE_INODE_EVENT(xfs_iget_miss);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  622) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  623) DEFINE_INODE_EVENT(xfs_getattr);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  624) DEFINE_INODE_EVENT(xfs_setattr);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  625) DEFINE_INODE_EVENT(xfs_readlink);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  626) DEFINE_INODE_EVENT(xfs_inactive_symlink);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  627) DEFINE_INODE_EVENT(xfs_alloc_file_space);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  628) DEFINE_INODE_EVENT(xfs_free_file_space);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  629) DEFINE_INODE_EVENT(xfs_zero_file_space);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  630) DEFINE_INODE_EVENT(xfs_collapse_file_space);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  631) DEFINE_INODE_EVENT(xfs_insert_file_space);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  632) DEFINE_INODE_EVENT(xfs_readdir);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  633) #ifdef CONFIG_XFS_POSIX_ACL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  634) DEFINE_INODE_EVENT(xfs_get_acl);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  635) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  636) DEFINE_INODE_EVENT(xfs_vm_bmap);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  637) DEFINE_INODE_EVENT(xfs_file_ioctl);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  638) DEFINE_INODE_EVENT(xfs_file_compat_ioctl);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  639) DEFINE_INODE_EVENT(xfs_ioctl_setattr);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  640) DEFINE_INODE_EVENT(xfs_dir_fsync);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  641) DEFINE_INODE_EVENT(xfs_file_fsync);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  642) DEFINE_INODE_EVENT(xfs_destroy_inode);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  643) DEFINE_INODE_EVENT(xfs_update_time);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  644) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  645) DEFINE_INODE_EVENT(xfs_dquot_dqalloc);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  646) DEFINE_INODE_EVENT(xfs_dquot_dqdetach);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  647) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  648) DEFINE_INODE_EVENT(xfs_inode_set_eofblocks_tag);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  649) DEFINE_INODE_EVENT(xfs_inode_clear_eofblocks_tag);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  650) DEFINE_INODE_EVENT(xfs_inode_free_eofblocks_invalid);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  651) DEFINE_INODE_EVENT(xfs_inode_set_cowblocks_tag);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  652) DEFINE_INODE_EVENT(xfs_inode_clear_cowblocks_tag);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  653) DEFINE_INODE_EVENT(xfs_inode_free_cowblocks_invalid);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  654) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  655) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  656)  * ftrace's __print_symbolic requires that all enum values be wrapped in the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  657)  * TRACE_DEFINE_ENUM macro so that the enum value can be encoded in the ftrace
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  658)  * ring buffer.  Somehow this was only worth mentioning in the ftrace sample
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  659)  * code.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  660)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  661) TRACE_DEFINE_ENUM(PE_SIZE_PTE);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  662) TRACE_DEFINE_ENUM(PE_SIZE_PMD);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  663) TRACE_DEFINE_ENUM(PE_SIZE_PUD);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  664) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  665) TRACE_EVENT(xfs_filemap_fault,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  666) 	TP_PROTO(struct xfs_inode *ip, enum page_entry_size pe_size,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  667) 		 bool write_fault),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  668) 	TP_ARGS(ip, pe_size, write_fault),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  669) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  670) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  671) 		__field(xfs_ino_t, ino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  672) 		__field(enum page_entry_size, pe_size)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  673) 		__field(bool, write_fault)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  674) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  675) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  676) 		__entry->dev = VFS_I(ip)->i_sb->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  677) 		__entry->ino = ip->i_ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  678) 		__entry->pe_size = pe_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  679) 		__entry->write_fault = write_fault;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  680) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  681) 	TP_printk("dev %d:%d ino 0x%llx %s write_fault %d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  682) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  683) 		  __entry->ino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  684) 		  __print_symbolic(__entry->pe_size,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  685) 			{ PE_SIZE_PTE,	"PTE" },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  686) 			{ PE_SIZE_PMD,	"PMD" },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  687) 			{ PE_SIZE_PUD,	"PUD" }),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  688) 		  __entry->write_fault)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  689) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  690) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  691) DECLARE_EVENT_CLASS(xfs_iref_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  692) 	TP_PROTO(struct xfs_inode *ip, unsigned long caller_ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  693) 	TP_ARGS(ip, caller_ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  694) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  695) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  696) 		__field(xfs_ino_t, ino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  697) 		__field(int, count)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  698) 		__field(int, pincount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  699) 		__field(unsigned long, caller_ip)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  700) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  701) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  702) 		__entry->dev = VFS_I(ip)->i_sb->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  703) 		__entry->ino = ip->i_ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  704) 		__entry->count = atomic_read(&VFS_I(ip)->i_count);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  705) 		__entry->pincount = atomic_read(&ip->i_pincount);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  706) 		__entry->caller_ip = caller_ip;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  707) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  708) 	TP_printk("dev %d:%d ino 0x%llx count %d pincount %d caller %pS",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  709) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  710) 		  __entry->ino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  711) 		  __entry->count,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  712) 		  __entry->pincount,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  713) 		  (char *)__entry->caller_ip)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  714) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  715) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  716) TRACE_EVENT(xfs_iomap_prealloc_size,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  717) 	TP_PROTO(struct xfs_inode *ip, xfs_fsblock_t blocks, int shift,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  718) 		 unsigned int writeio_blocks),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  719) 	TP_ARGS(ip, blocks, shift, writeio_blocks),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  720) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  721) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  722) 		__field(xfs_ino_t, ino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  723) 		__field(xfs_fsblock_t, blocks)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  724) 		__field(int, shift)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  725) 		__field(unsigned int, writeio_blocks)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  726) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  727) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  728) 		__entry->dev = VFS_I(ip)->i_sb->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  729) 		__entry->ino = ip->i_ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  730) 		__entry->blocks = blocks;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  731) 		__entry->shift = shift;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  732) 		__entry->writeio_blocks = writeio_blocks;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  733) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  734) 	TP_printk("dev %d:%d ino 0x%llx prealloc blocks %llu shift %d "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  735) 		  "m_allocsize_blocks %u",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  736) 		  MAJOR(__entry->dev), MINOR(__entry->dev), __entry->ino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  737) 		  __entry->blocks, __entry->shift, __entry->writeio_blocks)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  738) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  739) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  740) TRACE_EVENT(xfs_irec_merge_pre,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  741) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, xfs_agino_t agino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  742) 		 uint16_t holemask, xfs_agino_t nagino, uint16_t nholemask),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  743) 	TP_ARGS(mp, agno, agino, holemask, nagino, nholemask),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  744) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  745) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  746) 		__field(xfs_agnumber_t, agno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  747) 		__field(xfs_agino_t, agino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  748) 		__field(uint16_t, holemask)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  749) 		__field(xfs_agino_t, nagino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  750) 		__field(uint16_t, nholemask)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  751) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  752) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  753) 		__entry->dev = mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  754) 		__entry->agno = agno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  755) 		__entry->agino = agino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  756) 		__entry->holemask = holemask;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  757) 		__entry->nagino = nagino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  758) 		__entry->nholemask = holemask;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  759) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  760) 	TP_printk("dev %d:%d agno %d inobt (%u:0x%x) new (%u:0x%x)",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  761) 		  MAJOR(__entry->dev), MINOR(__entry->dev), __entry->agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  762) 		  __entry->agino, __entry->holemask, __entry->nagino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  763) 		  __entry->nholemask)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  764) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  765) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  766) TRACE_EVENT(xfs_irec_merge_post,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  767) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, xfs_agino_t agino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  768) 		 uint16_t holemask),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  769) 	TP_ARGS(mp, agno, agino, holemask),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  770) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  771) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  772) 		__field(xfs_agnumber_t, agno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  773) 		__field(xfs_agino_t, agino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  774) 		__field(uint16_t, holemask)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  775) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  776) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  777) 		__entry->dev = mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  778) 		__entry->agno = agno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  779) 		__entry->agino = agino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  780) 		__entry->holemask = holemask;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  781) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  782) 	TP_printk("dev %d:%d agno %d inobt (%u:0x%x)", MAJOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  783) 		  MINOR(__entry->dev), __entry->agno, __entry->agino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  784) 		  __entry->holemask)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  785) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  786) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  787) #define DEFINE_IREF_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  788) DEFINE_EVENT(xfs_iref_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  789) 	TP_PROTO(struct xfs_inode *ip, unsigned long caller_ip), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  790) 	TP_ARGS(ip, caller_ip))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  791) DEFINE_IREF_EVENT(xfs_irele);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  792) DEFINE_IREF_EVENT(xfs_inode_pin);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  793) DEFINE_IREF_EVENT(xfs_inode_unpin);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  794) DEFINE_IREF_EVENT(xfs_inode_unpin_nowait);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  795) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  796) DECLARE_EVENT_CLASS(xfs_namespace_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  797) 	TP_PROTO(struct xfs_inode *dp, struct xfs_name *name),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  798) 	TP_ARGS(dp, name),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  799) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  800) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  801) 		__field(xfs_ino_t, dp_ino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  802) 		__field(int, namelen)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  803) 		__dynamic_array(char, name, name->len)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  804) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  805) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  806) 		__entry->dev = VFS_I(dp)->i_sb->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  807) 		__entry->dp_ino = dp->i_ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  808) 		__entry->namelen = name->len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  809) 		memcpy(__get_str(name), name->name, name->len);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  810) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  811) 	TP_printk("dev %d:%d dp ino 0x%llx name %.*s",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  812) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  813) 		  __entry->dp_ino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  814) 		  __entry->namelen,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  815) 		  __get_str(name))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  816) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  817) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  818) #define DEFINE_NAMESPACE_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  819) DEFINE_EVENT(xfs_namespace_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  820) 	TP_PROTO(struct xfs_inode *dp, struct xfs_name *name), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  821) 	TP_ARGS(dp, name))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  822) DEFINE_NAMESPACE_EVENT(xfs_remove);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  823) DEFINE_NAMESPACE_EVENT(xfs_link);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  824) DEFINE_NAMESPACE_EVENT(xfs_lookup);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  825) DEFINE_NAMESPACE_EVENT(xfs_create);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  826) DEFINE_NAMESPACE_EVENT(xfs_symlink);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  827) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  828) TRACE_EVENT(xfs_rename,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  829) 	TP_PROTO(struct xfs_inode *src_dp, struct xfs_inode *target_dp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  830) 		 struct xfs_name *src_name, struct xfs_name *target_name),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  831) 	TP_ARGS(src_dp, target_dp, src_name, target_name),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  832) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  833) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  834) 		__field(xfs_ino_t, src_dp_ino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  835) 		__field(xfs_ino_t, target_dp_ino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  836) 		__field(int, src_namelen)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  837) 		__field(int, target_namelen)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  838) 		__dynamic_array(char, src_name, src_name->len)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  839) 		__dynamic_array(char, target_name, target_name->len)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  840) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  841) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  842) 		__entry->dev = VFS_I(src_dp)->i_sb->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  843) 		__entry->src_dp_ino = src_dp->i_ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  844) 		__entry->target_dp_ino = target_dp->i_ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  845) 		__entry->src_namelen = src_name->len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  846) 		__entry->target_namelen = target_name->len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  847) 		memcpy(__get_str(src_name), src_name->name, src_name->len);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  848) 		memcpy(__get_str(target_name), target_name->name,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  849) 			target_name->len);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  850) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  851) 	TP_printk("dev %d:%d src dp ino 0x%llx target dp ino 0x%llx"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  852) 		  " src name %.*s target name %.*s",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  853) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  854) 		  __entry->src_dp_ino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  855) 		  __entry->target_dp_ino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  856) 		  __entry->src_namelen,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  857) 		  __get_str(src_name),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  858) 		  __entry->target_namelen,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  859) 		  __get_str(target_name))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  860) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  861) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  862) DECLARE_EVENT_CLASS(xfs_dquot_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  863) 	TP_PROTO(struct xfs_dquot *dqp),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  864) 	TP_ARGS(dqp),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  865) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  866) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  867) 		__field(u32, id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  868) 		__field(xfs_dqtype_t, type)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  869) 		__field(unsigned, flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  870) 		__field(unsigned, nrefs)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  871) 		__field(unsigned long long, res_bcount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  872) 		__field(unsigned long long, res_rtbcount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  873) 		__field(unsigned long long, res_icount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  874) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  875) 		__field(unsigned long long, bcount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  876) 		__field(unsigned long long, rtbcount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  877) 		__field(unsigned long long, icount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  878) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  879) 		__field(unsigned long long, blk_hardlimit)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  880) 		__field(unsigned long long, blk_softlimit)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  881) 		__field(unsigned long long, rtb_hardlimit)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  882) 		__field(unsigned long long, rtb_softlimit)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  883) 		__field(unsigned long long, ino_hardlimit)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  884) 		__field(unsigned long long, ino_softlimit)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  885) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  886) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  887) 		__entry->dev = dqp->q_mount->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  888) 		__entry->id = dqp->q_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  889) 		__entry->type = dqp->q_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  890) 		__entry->flags = dqp->q_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  891) 		__entry->nrefs = dqp->q_nrefs;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  892) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  893) 		__entry->res_bcount = dqp->q_blk.reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  894) 		__entry->res_rtbcount = dqp->q_rtb.reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  895) 		__entry->res_icount = dqp->q_ino.reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  896) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  897) 		__entry->bcount = dqp->q_blk.count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  898) 		__entry->rtbcount = dqp->q_rtb.count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  899) 		__entry->icount = dqp->q_ino.count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  900) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  901) 		__entry->blk_hardlimit = dqp->q_blk.hardlimit;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  902) 		__entry->blk_softlimit = dqp->q_blk.softlimit;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  903) 		__entry->rtb_hardlimit = dqp->q_rtb.hardlimit;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  904) 		__entry->rtb_softlimit = dqp->q_rtb.softlimit;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  905) 		__entry->ino_hardlimit = dqp->q_ino.hardlimit;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  906) 		__entry->ino_softlimit = dqp->q_ino.softlimit;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  907) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  908) 	TP_printk("dev %d:%d id 0x%x type %s flags %s nrefs %u "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  909) 		  "res_bc 0x%llx res_rtbc 0x%llx res_ic 0x%llx "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  910) 		  "bcnt 0x%llx bhardlimit 0x%llx bsoftlimit 0x%llx "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  911) 		  "rtbcnt 0x%llx rtbhardlimit 0x%llx rtbsoftlimit 0x%llx "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  912) 		  "icnt 0x%llx ihardlimit 0x%llx isoftlimit 0x%llx]",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  913) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  914) 		  __entry->id,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  915) 		  __print_flags(__entry->type, "|", XFS_DQTYPE_STRINGS),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  916) 		  __print_flags(__entry->flags, "|", XFS_DQFLAG_STRINGS),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  917) 		  __entry->nrefs,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  918) 		  __entry->res_bcount,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  919) 		  __entry->res_rtbcount,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  920) 		  __entry->res_icount,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  921) 		  __entry->bcount,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  922) 		  __entry->blk_hardlimit,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  923) 		  __entry->blk_softlimit,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  924) 		  __entry->rtbcount,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  925) 		  __entry->rtb_hardlimit,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  926) 		  __entry->rtb_softlimit,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  927) 		  __entry->icount,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  928) 		  __entry->ino_hardlimit,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  929) 		  __entry->ino_softlimit)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  930) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  931) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  932) #define DEFINE_DQUOT_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  933) DEFINE_EVENT(xfs_dquot_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  934) 	TP_PROTO(struct xfs_dquot *dqp), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  935) 	TP_ARGS(dqp))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  936) DEFINE_DQUOT_EVENT(xfs_dqadjust);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  937) DEFINE_DQUOT_EVENT(xfs_dqreclaim_want);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  938) DEFINE_DQUOT_EVENT(xfs_dqreclaim_dirty);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  939) DEFINE_DQUOT_EVENT(xfs_dqreclaim_busy);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  940) DEFINE_DQUOT_EVENT(xfs_dqreclaim_done);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  941) DEFINE_DQUOT_EVENT(xfs_dqattach_found);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  942) DEFINE_DQUOT_EVENT(xfs_dqattach_get);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  943) DEFINE_DQUOT_EVENT(xfs_dqalloc);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  944) DEFINE_DQUOT_EVENT(xfs_dqtobp_read);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  945) DEFINE_DQUOT_EVENT(xfs_dqread);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  946) DEFINE_DQUOT_EVENT(xfs_dqread_fail);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  947) DEFINE_DQUOT_EVENT(xfs_dqget_hit);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  948) DEFINE_DQUOT_EVENT(xfs_dqget_miss);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  949) DEFINE_DQUOT_EVENT(xfs_dqget_freeing);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  950) DEFINE_DQUOT_EVENT(xfs_dqget_dup);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  951) DEFINE_DQUOT_EVENT(xfs_dqput);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  952) DEFINE_DQUOT_EVENT(xfs_dqput_free);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  953) DEFINE_DQUOT_EVENT(xfs_dqrele);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  954) DEFINE_DQUOT_EVENT(xfs_dqflush);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  955) DEFINE_DQUOT_EVENT(xfs_dqflush_force);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  956) DEFINE_DQUOT_EVENT(xfs_dqflush_done);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  957) DEFINE_DQUOT_EVENT(xfs_trans_apply_dquot_deltas_before);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  958) DEFINE_DQUOT_EVENT(xfs_trans_apply_dquot_deltas_after);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  959) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  960) #define XFS_QMOPT_FLAGS \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  961) 	{ XFS_QMOPT_UQUOTA,		"UQUOTA" }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  962) 	{ XFS_QMOPT_PQUOTA,		"PQUOTA" }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  963) 	{ XFS_QMOPT_FORCE_RES,		"FORCE_RES" }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  964) 	{ XFS_QMOPT_SBVERSION,		"SBVERSION" }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  965) 	{ XFS_QMOPT_GQUOTA,		"GQUOTA" }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  966) 	{ XFS_QMOPT_INHERIT,		"INHERIT" }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  967) 	{ XFS_QMOPT_RES_REGBLKS,	"RES_REGBLKS" }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  968) 	{ XFS_QMOPT_RES_RTBLKS,		"RES_RTBLKS" }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  969) 	{ XFS_QMOPT_BCOUNT,		"BCOUNT" }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  970) 	{ XFS_QMOPT_ICOUNT,		"ICOUNT" }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  971) 	{ XFS_QMOPT_RTBCOUNT,		"RTBCOUNT" }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  972) 	{ XFS_QMOPT_DELBCOUNT,		"DELBCOUNT" }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  973) 	{ XFS_QMOPT_DELRTBCOUNT,	"DELRTBCOUNT" }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  974) 	{ XFS_QMOPT_RES_INOS,		"RES_INOS" }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  975) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  976) TRACE_EVENT(xfs_trans_mod_dquot,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  977) 	TP_PROTO(struct xfs_trans *tp, struct xfs_dquot *dqp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  978) 		 unsigned int field, int64_t delta),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  979) 	TP_ARGS(tp, dqp, field, delta),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  980) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  981) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  982) 		__field(xfs_dqtype_t, type)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  983) 		__field(unsigned int, flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  984) 		__field(unsigned int, dqid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  985) 		__field(unsigned int, field)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  986) 		__field(int64_t, delta)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  987) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  988) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  989) 		__entry->dev = tp->t_mountp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  990) 		__entry->type = dqp->q_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  991) 		__entry->flags = dqp->q_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  992) 		__entry->dqid = dqp->q_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  993) 		__entry->field = field;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  994) 		__entry->delta = delta;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  995) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  996) 	TP_printk("dev %d:%d dquot id 0x%x type %s flags %s field %s delta %lld",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  997) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  998) 		  __entry->dqid,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  999) 		  __print_flags(__entry->type, "|", XFS_DQTYPE_STRINGS),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1000) 		  __print_flags(__entry->flags, "|", XFS_DQFLAG_STRINGS),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1001) 		  __print_flags(__entry->field, "|", XFS_QMOPT_FLAGS),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1002) 		  __entry->delta)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1003) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1004) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1005) DECLARE_EVENT_CLASS(xfs_dqtrx_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1006) 	TP_PROTO(struct xfs_dqtrx *qtrx),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1007) 	TP_ARGS(qtrx),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1008) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1009) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1010) 		__field(xfs_dqtype_t, type)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1011) 		__field(unsigned int, flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1012) 		__field(u32, dqid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1013) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1014) 		__field(uint64_t, blk_res)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1015) 		__field(int64_t,  bcount_delta)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1016) 		__field(int64_t,  delbcnt_delta)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1017) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1018) 		__field(uint64_t, rtblk_res)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1019) 		__field(uint64_t, rtblk_res_used)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1020) 		__field(int64_t,  rtbcount_delta)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1021) 		__field(int64_t,  delrtb_delta)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1022) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1023) 		__field(uint64_t, ino_res)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1024) 		__field(uint64_t, ino_res_used)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1025) 		__field(int64_t,  icount_delta)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1026) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1027) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1028) 		__entry->dev = qtrx->qt_dquot->q_mount->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1029) 		__entry->type = qtrx->qt_dquot->q_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1030) 		__entry->flags = qtrx->qt_dquot->q_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1031) 		__entry->dqid = qtrx->qt_dquot->q_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1032) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1033) 		__entry->blk_res = qtrx->qt_blk_res;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1034) 		__entry->bcount_delta = qtrx->qt_bcount_delta;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1035) 		__entry->delbcnt_delta = qtrx->qt_delbcnt_delta;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1036) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1037) 		__entry->rtblk_res = qtrx->qt_rtblk_res;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1038) 		__entry->rtblk_res_used = qtrx->qt_rtblk_res_used;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1039) 		__entry->rtbcount_delta = qtrx->qt_rtbcount_delta;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1040) 		__entry->delrtb_delta = qtrx->qt_delrtb_delta;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1041) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1042) 		__entry->ino_res = qtrx->qt_ino_res;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1043) 		__entry->ino_res_used = qtrx->qt_ino_res_used;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1044) 		__entry->icount_delta = qtrx->qt_icount_delta;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1045) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1046) 	TP_printk("dev %d:%d dquot id 0x%x type %s flags %s"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1047) 		  "blk_res %llu bcount_delta %lld delbcnt_delta %lld "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1048) 		  "rtblk_res %llu rtblk_res_used %llu rtbcount_delta %lld delrtb_delta %lld "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1049) 		  "ino_res %llu ino_res_used %llu icount_delta %lld",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1050) 		MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1051) 		__entry->dqid,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1052) 		  __print_flags(__entry->type, "|", XFS_DQTYPE_STRINGS),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1053) 		  __print_flags(__entry->flags, "|", XFS_DQFLAG_STRINGS),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1054) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1055) 		__entry->blk_res,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1056) 		__entry->bcount_delta,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1057) 		__entry->delbcnt_delta,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1058) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1059) 		__entry->rtblk_res,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1060) 		__entry->rtblk_res_used,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1061) 		__entry->rtbcount_delta,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1062) 		__entry->delrtb_delta,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1063) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1064) 		__entry->ino_res,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1065) 		__entry->ino_res_used,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1066) 		__entry->icount_delta)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1067) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1068) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1069) #define DEFINE_DQTRX_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1070) DEFINE_EVENT(xfs_dqtrx_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1071) 	TP_PROTO(struct xfs_dqtrx *qtrx), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1072) 	TP_ARGS(qtrx))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1073) DEFINE_DQTRX_EVENT(xfs_trans_apply_dquot_deltas);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1074) DEFINE_DQTRX_EVENT(xfs_trans_mod_dquot_before);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1075) DEFINE_DQTRX_EVENT(xfs_trans_mod_dquot_after);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1076) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1077) DECLARE_EVENT_CLASS(xfs_loggrant_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1078) 	TP_PROTO(struct xlog *log, struct xlog_ticket *tic),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1079) 	TP_ARGS(log, tic),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1080) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1081) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1082) 		__field(char, ocnt)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1083) 		__field(char, cnt)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1084) 		__field(int, curr_res)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1085) 		__field(int, unit_res)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1086) 		__field(unsigned int, flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1087) 		__field(int, reserveq)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1088) 		__field(int, writeq)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1089) 		__field(int, grant_reserve_cycle)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1090) 		__field(int, grant_reserve_bytes)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1091) 		__field(int, grant_write_cycle)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1092) 		__field(int, grant_write_bytes)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1093) 		__field(int, curr_cycle)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1094) 		__field(int, curr_block)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1095) 		__field(xfs_lsn_t, tail_lsn)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1096) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1097) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1098) 		__entry->dev = log->l_mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1099) 		__entry->ocnt = tic->t_ocnt;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1100) 		__entry->cnt = tic->t_cnt;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1101) 		__entry->curr_res = tic->t_curr_res;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1102) 		__entry->unit_res = tic->t_unit_res;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1103) 		__entry->flags = tic->t_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1104) 		__entry->reserveq = list_empty(&log->l_reserve_head.waiters);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1105) 		__entry->writeq = list_empty(&log->l_write_head.waiters);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1106) 		xlog_crack_grant_head(&log->l_reserve_head.grant,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1107) 				&__entry->grant_reserve_cycle,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1108) 				&__entry->grant_reserve_bytes);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1109) 		xlog_crack_grant_head(&log->l_write_head.grant,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1110) 				&__entry->grant_write_cycle,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1111) 				&__entry->grant_write_bytes);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1112) 		__entry->curr_cycle = log->l_curr_cycle;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1113) 		__entry->curr_block = log->l_curr_block;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1114) 		__entry->tail_lsn = atomic64_read(&log->l_tail_lsn);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1115) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1116) 	TP_printk("dev %d:%d t_ocnt %u t_cnt %u t_curr_res %u "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1117) 		  "t_unit_res %u t_flags %s reserveq %s "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1118) 		  "writeq %s grant_reserve_cycle %d "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1119) 		  "grant_reserve_bytes %d grant_write_cycle %d "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1120) 		  "grant_write_bytes %d curr_cycle %d curr_block %d "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1121) 		  "tail_cycle %d tail_block %d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1122) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1123) 		  __entry->ocnt,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1124) 		  __entry->cnt,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1125) 		  __entry->curr_res,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1126) 		  __entry->unit_res,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1127) 		  __print_flags(__entry->flags, "|", XLOG_TIC_FLAGS),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1128) 		  __entry->reserveq ? "empty" : "active",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1129) 		  __entry->writeq ? "empty" : "active",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1130) 		  __entry->grant_reserve_cycle,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1131) 		  __entry->grant_reserve_bytes,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1132) 		  __entry->grant_write_cycle,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1133) 		  __entry->grant_write_bytes,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1134) 		  __entry->curr_cycle,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1135) 		  __entry->curr_block,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1136) 		  CYCLE_LSN(__entry->tail_lsn),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1137) 		  BLOCK_LSN(__entry->tail_lsn)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1138) 	)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1139) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1140) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1141) #define DEFINE_LOGGRANT_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1142) DEFINE_EVENT(xfs_loggrant_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1143) 	TP_PROTO(struct xlog *log, struct xlog_ticket *tic), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1144) 	TP_ARGS(log, tic))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1145) DEFINE_LOGGRANT_EVENT(xfs_log_umount_write);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1146) DEFINE_LOGGRANT_EVENT(xfs_log_grant_sleep);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1147) DEFINE_LOGGRANT_EVENT(xfs_log_grant_wake);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1148) DEFINE_LOGGRANT_EVENT(xfs_log_grant_wake_up);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1149) DEFINE_LOGGRANT_EVENT(xfs_log_reserve);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1150) DEFINE_LOGGRANT_EVENT(xfs_log_reserve_exit);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1151) DEFINE_LOGGRANT_EVENT(xfs_log_regrant);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1152) DEFINE_LOGGRANT_EVENT(xfs_log_regrant_exit);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1153) DEFINE_LOGGRANT_EVENT(xfs_log_ticket_regrant);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1154) DEFINE_LOGGRANT_EVENT(xfs_log_ticket_regrant_exit);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1155) DEFINE_LOGGRANT_EVENT(xfs_log_ticket_regrant_sub);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1156) DEFINE_LOGGRANT_EVENT(xfs_log_ticket_ungrant);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1157) DEFINE_LOGGRANT_EVENT(xfs_log_ticket_ungrant_sub);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1158) DEFINE_LOGGRANT_EVENT(xfs_log_ticket_ungrant_exit);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1159) DEFINE_LOGGRANT_EVENT(xfs_log_cil_wait);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1160) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1161) DECLARE_EVENT_CLASS(xfs_log_item_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1162) 	TP_PROTO(struct xfs_log_item *lip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1163) 	TP_ARGS(lip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1164) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1165) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1166) 		__field(void *, lip)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1167) 		__field(uint, type)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1168) 		__field(unsigned long, flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1169) 		__field(xfs_lsn_t, lsn)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1170) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1171) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1172) 		__entry->dev = lip->li_mountp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1173) 		__entry->lip = lip;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1174) 		__entry->type = lip->li_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1175) 		__entry->flags = lip->li_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1176) 		__entry->lsn = lip->li_lsn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1177) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1178) 	TP_printk("dev %d:%d lip %p lsn %d/%d type %s flags %s",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1179) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1180) 		  __entry->lip,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1181) 		  CYCLE_LSN(__entry->lsn), BLOCK_LSN(__entry->lsn),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1182) 		  __print_symbolic(__entry->type, XFS_LI_TYPE_DESC),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1183) 		  __print_flags(__entry->flags, "|", XFS_LI_FLAGS))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1184) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1185) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1186) TRACE_EVENT(xfs_log_force,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1187) 	TP_PROTO(struct xfs_mount *mp, xfs_lsn_t lsn, unsigned long caller_ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1188) 	TP_ARGS(mp, lsn, caller_ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1189) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1190) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1191) 		__field(xfs_lsn_t, lsn)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1192) 		__field(unsigned long, caller_ip)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1193) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1194) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1195) 		__entry->dev = mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1196) 		__entry->lsn = lsn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1197) 		__entry->caller_ip = caller_ip;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1198) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1199) 	TP_printk("dev %d:%d lsn 0x%llx caller %pS",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1200) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1201) 		  __entry->lsn, (void *)__entry->caller_ip)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1202) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1203) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1204) #define DEFINE_LOG_ITEM_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1205) DEFINE_EVENT(xfs_log_item_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1206) 	TP_PROTO(struct xfs_log_item *lip), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1207) 	TP_ARGS(lip))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1208) DEFINE_LOG_ITEM_EVENT(xfs_ail_push);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1209) DEFINE_LOG_ITEM_EVENT(xfs_ail_pinned);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1210) DEFINE_LOG_ITEM_EVENT(xfs_ail_locked);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1211) DEFINE_LOG_ITEM_EVENT(xfs_ail_flushing);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1212) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1213) DECLARE_EVENT_CLASS(xfs_ail_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1214) 	TP_PROTO(struct xfs_log_item *lip, xfs_lsn_t old_lsn, xfs_lsn_t new_lsn),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1215) 	TP_ARGS(lip, old_lsn, new_lsn),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1216) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1217) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1218) 		__field(void *, lip)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1219) 		__field(uint, type)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1220) 		__field(unsigned long, flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1221) 		__field(xfs_lsn_t, old_lsn)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1222) 		__field(xfs_lsn_t, new_lsn)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1223) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1224) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1225) 		__entry->dev = lip->li_mountp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1226) 		__entry->lip = lip;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1227) 		__entry->type = lip->li_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1228) 		__entry->flags = lip->li_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1229) 		__entry->old_lsn = old_lsn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1230) 		__entry->new_lsn = new_lsn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1231) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1232) 	TP_printk("dev %d:%d lip %p old lsn %d/%d new lsn %d/%d type %s flags %s",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1233) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1234) 		  __entry->lip,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1235) 		  CYCLE_LSN(__entry->old_lsn), BLOCK_LSN(__entry->old_lsn),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1236) 		  CYCLE_LSN(__entry->new_lsn), BLOCK_LSN(__entry->new_lsn),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1237) 		  __print_symbolic(__entry->type, XFS_LI_TYPE_DESC),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1238) 		  __print_flags(__entry->flags, "|", XFS_LI_FLAGS))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1239) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1240) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1241) #define DEFINE_AIL_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1242) DEFINE_EVENT(xfs_ail_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1243) 	TP_PROTO(struct xfs_log_item *lip, xfs_lsn_t old_lsn, xfs_lsn_t new_lsn), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1244) 	TP_ARGS(lip, old_lsn, new_lsn))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1245) DEFINE_AIL_EVENT(xfs_ail_insert);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1246) DEFINE_AIL_EVENT(xfs_ail_move);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1247) DEFINE_AIL_EVENT(xfs_ail_delete);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1248) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1249) TRACE_EVENT(xfs_log_assign_tail_lsn,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1250) 	TP_PROTO(struct xlog *log, xfs_lsn_t new_lsn),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1251) 	TP_ARGS(log, new_lsn),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1252) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1253) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1254) 		__field(xfs_lsn_t, new_lsn)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1255) 		__field(xfs_lsn_t, old_lsn)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1256) 		__field(xfs_lsn_t, last_sync_lsn)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1257) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1258) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1259) 		__entry->dev = log->l_mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1260) 		__entry->new_lsn = new_lsn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1261) 		__entry->old_lsn = atomic64_read(&log->l_tail_lsn);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1262) 		__entry->last_sync_lsn = atomic64_read(&log->l_last_sync_lsn);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1263) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1264) 	TP_printk("dev %d:%d new tail lsn %d/%d, old lsn %d/%d, last sync %d/%d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1265) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1266) 		  CYCLE_LSN(__entry->new_lsn), BLOCK_LSN(__entry->new_lsn),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1267) 		  CYCLE_LSN(__entry->old_lsn), BLOCK_LSN(__entry->old_lsn),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1268) 		  CYCLE_LSN(__entry->last_sync_lsn), BLOCK_LSN(__entry->last_sync_lsn))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1269) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1270) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1271) DECLARE_EVENT_CLASS(xfs_file_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1272) 	TP_PROTO(struct xfs_inode *ip, size_t count, loff_t offset),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1273) 	TP_ARGS(ip, count, offset),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1274) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1275) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1276) 		__field(xfs_ino_t, ino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1277) 		__field(xfs_fsize_t, size)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1278) 		__field(loff_t, offset)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1279) 		__field(size_t, count)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1280) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1281) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1282) 		__entry->dev = VFS_I(ip)->i_sb->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1283) 		__entry->ino = ip->i_ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1284) 		__entry->size = ip->i_d.di_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1285) 		__entry->offset = offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1286) 		__entry->count = count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1287) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1288) 	TP_printk("dev %d:%d ino 0x%llx size 0x%llx offset 0x%llx count 0x%zx",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1289) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1290) 		  __entry->ino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1291) 		  __entry->size,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1292) 		  __entry->offset,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1293) 		  __entry->count)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1294) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1295) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1296) #define DEFINE_RW_EVENT(name)		\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1297) DEFINE_EVENT(xfs_file_class, name,	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1298) 	TP_PROTO(struct xfs_inode *ip, size_t count, loff_t offset),	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1299) 	TP_ARGS(ip, count, offset))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1300) DEFINE_RW_EVENT(xfs_file_buffered_read);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1301) DEFINE_RW_EVENT(xfs_file_direct_read);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1302) DEFINE_RW_EVENT(xfs_file_dax_read);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1303) DEFINE_RW_EVENT(xfs_file_buffered_write);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1304) DEFINE_RW_EVENT(xfs_file_direct_write);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1305) DEFINE_RW_EVENT(xfs_file_dax_write);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1306) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1307) DECLARE_EVENT_CLASS(xfs_imap_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1308) 	TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, ssize_t count,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1309) 		 int whichfork, struct xfs_bmbt_irec *irec),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1310) 	TP_ARGS(ip, offset, count, whichfork, irec),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1311) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1312) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1313) 		__field(xfs_ino_t, ino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1314) 		__field(loff_t, size)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1315) 		__field(loff_t, offset)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1316) 		__field(size_t, count)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1317) 		__field(int, whichfork)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1318) 		__field(xfs_fileoff_t, startoff)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1319) 		__field(xfs_fsblock_t, startblock)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1320) 		__field(xfs_filblks_t, blockcount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1321) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1322) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1323) 		__entry->dev = VFS_I(ip)->i_sb->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1324) 		__entry->ino = ip->i_ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1325) 		__entry->size = ip->i_d.di_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1326) 		__entry->offset = offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1327) 		__entry->count = count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1328) 		__entry->whichfork = whichfork;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1329) 		__entry->startoff = irec ? irec->br_startoff : 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1330) 		__entry->startblock = irec ? irec->br_startblock : 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1331) 		__entry->blockcount = irec ? irec->br_blockcount : 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1332) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1333) 	TP_printk("dev %d:%d ino 0x%llx size 0x%llx offset 0x%llx count %zd "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1334) 		  "fork %s startoff 0x%llx startblock %lld blockcount 0x%llx",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1335) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1336) 		  __entry->ino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1337) 		  __entry->size,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1338) 		  __entry->offset,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1339) 		  __entry->count,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1340) 		  __entry->whichfork == XFS_COW_FORK ? "cow" : "data",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1341) 		  __entry->startoff,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1342) 		  (int64_t)__entry->startblock,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1343) 		  __entry->blockcount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1344) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1345) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1346) #define DEFINE_IMAP_EVENT(name)	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1347) DEFINE_EVENT(xfs_imap_class, name,	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1348) 	TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, ssize_t count,	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1349) 		 int whichfork, struct xfs_bmbt_irec *irec),		\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1350) 	TP_ARGS(ip, offset, count, whichfork, irec))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1351) DEFINE_IMAP_EVENT(xfs_map_blocks_found);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1352) DEFINE_IMAP_EVENT(xfs_map_blocks_alloc);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1353) DEFINE_IMAP_EVENT(xfs_iomap_alloc);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1354) DEFINE_IMAP_EVENT(xfs_iomap_found);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1355) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1356) DECLARE_EVENT_CLASS(xfs_simple_io_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1357) 	TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, ssize_t count),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1358) 	TP_ARGS(ip, offset, count),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1359) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1360) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1361) 		__field(xfs_ino_t, ino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1362) 		__field(loff_t, isize)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1363) 		__field(loff_t, disize)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1364) 		__field(loff_t, offset)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1365) 		__field(size_t, count)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1366) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1367) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1368) 		__entry->dev = VFS_I(ip)->i_sb->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1369) 		__entry->ino = ip->i_ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1370) 		__entry->isize = VFS_I(ip)->i_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1371) 		__entry->disize = ip->i_d.di_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1372) 		__entry->offset = offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1373) 		__entry->count = count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1374) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1375) 	TP_printk("dev %d:%d ino 0x%llx isize 0x%llx disize 0x%llx "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1376) 		  "offset 0x%llx count %zd",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1377) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1378) 		  __entry->ino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1379) 		  __entry->isize,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1380) 		  __entry->disize,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1381) 		  __entry->offset,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1382) 		  __entry->count)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1383) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1384) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1385) #define DEFINE_SIMPLE_IO_EVENT(name)	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1386) DEFINE_EVENT(xfs_simple_io_class, name,	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1387) 	TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, ssize_t count),	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1388) 	TP_ARGS(ip, offset, count))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1389) DEFINE_SIMPLE_IO_EVENT(xfs_delalloc_enospc);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1390) DEFINE_SIMPLE_IO_EVENT(xfs_unwritten_convert);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1391) DEFINE_SIMPLE_IO_EVENT(xfs_setfilesize);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1392) DEFINE_SIMPLE_IO_EVENT(xfs_zero_eof);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1393) DEFINE_SIMPLE_IO_EVENT(xfs_end_io_direct_write);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1394) DEFINE_SIMPLE_IO_EVENT(xfs_end_io_direct_write_unwritten);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1395) DEFINE_SIMPLE_IO_EVENT(xfs_end_io_direct_write_append);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1396) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1397) DECLARE_EVENT_CLASS(xfs_itrunc_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1398) 	TP_PROTO(struct xfs_inode *ip, xfs_fsize_t new_size),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1399) 	TP_ARGS(ip, new_size),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1400) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1401) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1402) 		__field(xfs_ino_t, ino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1403) 		__field(xfs_fsize_t, size)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1404) 		__field(xfs_fsize_t, new_size)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1405) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1406) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1407) 		__entry->dev = VFS_I(ip)->i_sb->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1408) 		__entry->ino = ip->i_ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1409) 		__entry->size = ip->i_d.di_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1410) 		__entry->new_size = new_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1411) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1412) 	TP_printk("dev %d:%d ino 0x%llx size 0x%llx new_size 0x%llx",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1413) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1414) 		  __entry->ino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1415) 		  __entry->size,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1416) 		  __entry->new_size)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1417) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1418) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1419) #define DEFINE_ITRUNC_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1420) DEFINE_EVENT(xfs_itrunc_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1421) 	TP_PROTO(struct xfs_inode *ip, xfs_fsize_t new_size), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1422) 	TP_ARGS(ip, new_size))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1423) DEFINE_ITRUNC_EVENT(xfs_itruncate_extents_start);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1424) DEFINE_ITRUNC_EVENT(xfs_itruncate_extents_end);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1425) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1426) TRACE_EVENT(xfs_pagecache_inval,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1427) 	TP_PROTO(struct xfs_inode *ip, xfs_off_t start, xfs_off_t finish),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1428) 	TP_ARGS(ip, start, finish),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1429) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1430) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1431) 		__field(xfs_ino_t, ino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1432) 		__field(xfs_fsize_t, size)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1433) 		__field(xfs_off_t, start)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1434) 		__field(xfs_off_t, finish)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1435) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1436) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1437) 		__entry->dev = VFS_I(ip)->i_sb->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1438) 		__entry->ino = ip->i_ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1439) 		__entry->size = ip->i_d.di_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1440) 		__entry->start = start;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1441) 		__entry->finish = finish;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1442) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1443) 	TP_printk("dev %d:%d ino 0x%llx size 0x%llx start 0x%llx finish 0x%llx",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1444) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1445) 		  __entry->ino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1446) 		  __entry->size,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1447) 		  __entry->start,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1448) 		  __entry->finish)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1449) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1450) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1451) TRACE_EVENT(xfs_bunmap,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1452) 	TP_PROTO(struct xfs_inode *ip, xfs_fileoff_t bno, xfs_filblks_t len,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1453) 		 int flags, unsigned long caller_ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1454) 	TP_ARGS(ip, bno, len, flags, caller_ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1455) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1456) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1457) 		__field(xfs_ino_t, ino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1458) 		__field(xfs_fsize_t, size)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1459) 		__field(xfs_fileoff_t, bno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1460) 		__field(xfs_filblks_t, len)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1461) 		__field(unsigned long, caller_ip)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1462) 		__field(int, flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1463) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1464) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1465) 		__entry->dev = VFS_I(ip)->i_sb->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1466) 		__entry->ino = ip->i_ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1467) 		__entry->size = ip->i_d.di_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1468) 		__entry->bno = bno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1469) 		__entry->len = len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1470) 		__entry->caller_ip = caller_ip;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1471) 		__entry->flags = flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1472) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1473) 	TP_printk("dev %d:%d ino 0x%llx size 0x%llx bno 0x%llx len 0x%llx"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1474) 		  "flags %s caller %pS",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1475) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1476) 		  __entry->ino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1477) 		  __entry->size,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1478) 		  __entry->bno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1479) 		  __entry->len,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1480) 		  __print_flags(__entry->flags, "|", XFS_BMAPI_FLAGS),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1481) 		  (void *)__entry->caller_ip)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1482) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1483) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1484) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1485) DECLARE_EVENT_CLASS(xfs_extent_busy_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1486) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1487) 		 xfs_agblock_t agbno, xfs_extlen_t len),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1488) 	TP_ARGS(mp, agno, agbno, len),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1489) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1490) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1491) 		__field(xfs_agnumber_t, agno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1492) 		__field(xfs_agblock_t, agbno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1493) 		__field(xfs_extlen_t, len)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1494) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1495) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1496) 		__entry->dev = mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1497) 		__entry->agno = agno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1498) 		__entry->agbno = agbno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1499) 		__entry->len = len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1500) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1501) 	TP_printk("dev %d:%d agno %u agbno %u len %u",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1502) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1503) 		  __entry->agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1504) 		  __entry->agbno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1505) 		  __entry->len)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1506) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1507) #define DEFINE_BUSY_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1508) DEFINE_EVENT(xfs_extent_busy_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1509) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1510) 		 xfs_agblock_t agbno, xfs_extlen_t len), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1511) 	TP_ARGS(mp, agno, agbno, len))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1512) DEFINE_BUSY_EVENT(xfs_extent_busy);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1513) DEFINE_BUSY_EVENT(xfs_extent_busy_enomem);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1514) DEFINE_BUSY_EVENT(xfs_extent_busy_force);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1515) DEFINE_BUSY_EVENT(xfs_extent_busy_reuse);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1516) DEFINE_BUSY_EVENT(xfs_extent_busy_clear);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1517) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1518) TRACE_EVENT(xfs_extent_busy_trim,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1519) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1520) 		 xfs_agblock_t agbno, xfs_extlen_t len,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1521) 		 xfs_agblock_t tbno, xfs_extlen_t tlen),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1522) 	TP_ARGS(mp, agno, agbno, len, tbno, tlen),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1523) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1524) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1525) 		__field(xfs_agnumber_t, agno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1526) 		__field(xfs_agblock_t, agbno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1527) 		__field(xfs_extlen_t, len)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1528) 		__field(xfs_agblock_t, tbno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1529) 		__field(xfs_extlen_t, tlen)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1530) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1531) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1532) 		__entry->dev = mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1533) 		__entry->agno = agno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1534) 		__entry->agbno = agbno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1535) 		__entry->len = len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1536) 		__entry->tbno = tbno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1537) 		__entry->tlen = tlen;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1538) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1539) 	TP_printk("dev %d:%d agno %u agbno %u len %u tbno %u tlen %u",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1540) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1541) 		  __entry->agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1542) 		  __entry->agbno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1543) 		  __entry->len,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1544) 		  __entry->tbno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1545) 		  __entry->tlen)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1546) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1547) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1548) DECLARE_EVENT_CLASS(xfs_agf_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1549) 	TP_PROTO(struct xfs_mount *mp, struct xfs_agf *agf, int flags,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1550) 		 unsigned long caller_ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1551) 	TP_ARGS(mp, agf, flags, caller_ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1552) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1553) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1554) 		__field(xfs_agnumber_t, agno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1555) 		__field(int, flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1556) 		__field(__u32, length)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1557) 		__field(__u32, bno_root)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1558) 		__field(__u32, cnt_root)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1559) 		__field(__u32, bno_level)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1560) 		__field(__u32, cnt_level)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1561) 		__field(__u32, flfirst)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1562) 		__field(__u32, fllast)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1563) 		__field(__u32, flcount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1564) 		__field(__u32, freeblks)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1565) 		__field(__u32, longest)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1566) 		__field(unsigned long, caller_ip)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1567) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1568) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1569) 		__entry->dev = mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1570) 		__entry->agno = be32_to_cpu(agf->agf_seqno),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1571) 		__entry->flags = flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1572) 		__entry->length = be32_to_cpu(agf->agf_length),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1573) 		__entry->bno_root = be32_to_cpu(agf->agf_roots[XFS_BTNUM_BNO]),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1574) 		__entry->cnt_root = be32_to_cpu(agf->agf_roots[XFS_BTNUM_CNT]),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1575) 		__entry->bno_level =
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1576) 				be32_to_cpu(agf->agf_levels[XFS_BTNUM_BNO]),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1577) 		__entry->cnt_level =
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1578) 				be32_to_cpu(agf->agf_levels[XFS_BTNUM_CNT]),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1579) 		__entry->flfirst = be32_to_cpu(agf->agf_flfirst),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1580) 		__entry->fllast = be32_to_cpu(agf->agf_fllast),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1581) 		__entry->flcount = be32_to_cpu(agf->agf_flcount),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1582) 		__entry->freeblks = be32_to_cpu(agf->agf_freeblks),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1583) 		__entry->longest = be32_to_cpu(agf->agf_longest);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1584) 		__entry->caller_ip = caller_ip;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1585) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1586) 	TP_printk("dev %d:%d agno %u flags %s length %u roots b %u c %u "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1587) 		  "levels b %u c %u flfirst %u fllast %u flcount %u "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1588) 		  "freeblks %u longest %u caller %pS",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1589) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1590) 		  __entry->agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1591) 		  __print_flags(__entry->flags, "|", XFS_AGF_FLAGS),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1592) 		  __entry->length,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1593) 		  __entry->bno_root,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1594) 		  __entry->cnt_root,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1595) 		  __entry->bno_level,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1596) 		  __entry->cnt_level,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1597) 		  __entry->flfirst,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1598) 		  __entry->fllast,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1599) 		  __entry->flcount,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1600) 		  __entry->freeblks,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1601) 		  __entry->longest,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1602) 		  (void *)__entry->caller_ip)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1603) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1604) #define DEFINE_AGF_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1605) DEFINE_EVENT(xfs_agf_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1606) 	TP_PROTO(struct xfs_mount *mp, struct xfs_agf *agf, int flags, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1607) 		 unsigned long caller_ip), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1608) 	TP_ARGS(mp, agf, flags, caller_ip))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1609) DEFINE_AGF_EVENT(xfs_agf);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1610) DEFINE_AGF_EVENT(xfs_agfl_reset);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1611) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1612) TRACE_EVENT(xfs_free_extent,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1613) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, xfs_agblock_t agbno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1614) 		 xfs_extlen_t len, enum xfs_ag_resv_type resv, int haveleft,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1615) 		 int haveright),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1616) 	TP_ARGS(mp, agno, agbno, len, resv, haveleft, haveright),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1617) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1618) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1619) 		__field(xfs_agnumber_t, agno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1620) 		__field(xfs_agblock_t, agbno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1621) 		__field(xfs_extlen_t, len)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1622) 		__field(int, resv)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1623) 		__field(int, haveleft)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1624) 		__field(int, haveright)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1625) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1626) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1627) 		__entry->dev = mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1628) 		__entry->agno = agno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1629) 		__entry->agbno = agbno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1630) 		__entry->len = len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1631) 		__entry->resv = resv;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1632) 		__entry->haveleft = haveleft;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1633) 		__entry->haveright = haveright;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1634) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1635) 	TP_printk("dev %d:%d agno %u agbno %u len %u resv %d %s",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1636) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1637) 		  __entry->agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1638) 		  __entry->agbno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1639) 		  __entry->len,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1640) 		  __entry->resv,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1641) 		  __entry->haveleft ?
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1642) 			(__entry->haveright ? "both" : "left") :
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1643) 			(__entry->haveright ? "right" : "none"))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1644) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1645) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1646) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1647) DECLARE_EVENT_CLASS(xfs_alloc_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1648) 	TP_PROTO(struct xfs_alloc_arg *args),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1649) 	TP_ARGS(args),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1650) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1651) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1652) 		__field(xfs_agnumber_t, agno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1653) 		__field(xfs_agblock_t, agbno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1654) 		__field(xfs_extlen_t, minlen)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1655) 		__field(xfs_extlen_t, maxlen)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1656) 		__field(xfs_extlen_t, mod)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1657) 		__field(xfs_extlen_t, prod)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1658) 		__field(xfs_extlen_t, minleft)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1659) 		__field(xfs_extlen_t, total)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1660) 		__field(xfs_extlen_t, alignment)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1661) 		__field(xfs_extlen_t, minalignslop)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1662) 		__field(xfs_extlen_t, len)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1663) 		__field(short, type)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1664) 		__field(short, otype)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1665) 		__field(char, wasdel)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1666) 		__field(char, wasfromfl)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1667) 		__field(int, resv)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1668) 		__field(int, datatype)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1669) 		__field(xfs_fsblock_t, firstblock)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1670) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1671) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1672) 		__entry->dev = args->mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1673) 		__entry->agno = args->agno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1674) 		__entry->agbno = args->agbno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1675) 		__entry->minlen = args->minlen;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1676) 		__entry->maxlen = args->maxlen;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1677) 		__entry->mod = args->mod;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1678) 		__entry->prod = args->prod;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1679) 		__entry->minleft = args->minleft;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1680) 		__entry->total = args->total;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1681) 		__entry->alignment = args->alignment;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1682) 		__entry->minalignslop = args->minalignslop;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1683) 		__entry->len = args->len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1684) 		__entry->type = args->type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1685) 		__entry->otype = args->otype;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1686) 		__entry->wasdel = args->wasdel;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1687) 		__entry->wasfromfl = args->wasfromfl;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1688) 		__entry->resv = args->resv;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1689) 		__entry->datatype = args->datatype;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1690) 		__entry->firstblock = args->tp->t_firstblock;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1691) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1692) 	TP_printk("dev %d:%d agno %u agbno %u minlen %u maxlen %u mod %u "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1693) 		  "prod %u minleft %u total %u alignment %u minalignslop %u "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1694) 		  "len %u type %s otype %s wasdel %d wasfromfl %d resv %d "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1695) 		  "datatype 0x%x firstblock 0x%llx",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1696) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1697) 		  __entry->agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1698) 		  __entry->agbno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1699) 		  __entry->minlen,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1700) 		  __entry->maxlen,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1701) 		  __entry->mod,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1702) 		  __entry->prod,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1703) 		  __entry->minleft,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1704) 		  __entry->total,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1705) 		  __entry->alignment,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1706) 		  __entry->minalignslop,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1707) 		  __entry->len,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1708) 		  __print_symbolic(__entry->type, XFS_ALLOC_TYPES),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1709) 		  __print_symbolic(__entry->otype, XFS_ALLOC_TYPES),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1710) 		  __entry->wasdel,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1711) 		  __entry->wasfromfl,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1712) 		  __entry->resv,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1713) 		  __entry->datatype,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1714) 		  (unsigned long long)__entry->firstblock)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1715) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1716) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1717) #define DEFINE_ALLOC_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1718) DEFINE_EVENT(xfs_alloc_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1719) 	TP_PROTO(struct xfs_alloc_arg *args), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1720) 	TP_ARGS(args))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1721) DEFINE_ALLOC_EVENT(xfs_alloc_exact_done);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1722) DEFINE_ALLOC_EVENT(xfs_alloc_exact_notfound);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1723) DEFINE_ALLOC_EVENT(xfs_alloc_exact_error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1724) DEFINE_ALLOC_EVENT(xfs_alloc_near_nominleft);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1725) DEFINE_ALLOC_EVENT(xfs_alloc_near_first);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1726) DEFINE_ALLOC_EVENT(xfs_alloc_cur);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1727) DEFINE_ALLOC_EVENT(xfs_alloc_cur_right);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1728) DEFINE_ALLOC_EVENT(xfs_alloc_cur_left);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1729) DEFINE_ALLOC_EVENT(xfs_alloc_cur_lookup);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1730) DEFINE_ALLOC_EVENT(xfs_alloc_cur_lookup_done);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1731) DEFINE_ALLOC_EVENT(xfs_alloc_near_error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1732) DEFINE_ALLOC_EVENT(xfs_alloc_near_noentry);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1733) DEFINE_ALLOC_EVENT(xfs_alloc_near_busy);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1734) DEFINE_ALLOC_EVENT(xfs_alloc_size_neither);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1735) DEFINE_ALLOC_EVENT(xfs_alloc_size_noentry);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1736) DEFINE_ALLOC_EVENT(xfs_alloc_size_nominleft);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1737) DEFINE_ALLOC_EVENT(xfs_alloc_size_done);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1738) DEFINE_ALLOC_EVENT(xfs_alloc_size_error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1739) DEFINE_ALLOC_EVENT(xfs_alloc_size_busy);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1740) DEFINE_ALLOC_EVENT(xfs_alloc_small_freelist);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1741) DEFINE_ALLOC_EVENT(xfs_alloc_small_notenough);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1742) DEFINE_ALLOC_EVENT(xfs_alloc_small_done);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1743) DEFINE_ALLOC_EVENT(xfs_alloc_small_error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1744) DEFINE_ALLOC_EVENT(xfs_alloc_vextent_badargs);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1745) DEFINE_ALLOC_EVENT(xfs_alloc_vextent_nofix);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1746) DEFINE_ALLOC_EVENT(xfs_alloc_vextent_noagbp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1747) DEFINE_ALLOC_EVENT(xfs_alloc_vextent_loopfailed);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1748) DEFINE_ALLOC_EVENT(xfs_alloc_vextent_allfailed);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1749) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1750) TRACE_EVENT(xfs_alloc_cur_check,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1751) 	TP_PROTO(struct xfs_mount *mp, xfs_btnum_t btnum, xfs_agblock_t bno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1752) 		 xfs_extlen_t len, xfs_extlen_t diff, bool new),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1753) 	TP_ARGS(mp, btnum, bno, len, diff, new),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1754) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1755) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1756) 		__field(xfs_btnum_t, btnum)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1757) 		__field(xfs_agblock_t, bno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1758) 		__field(xfs_extlen_t, len)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1759) 		__field(xfs_extlen_t, diff)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1760) 		__field(bool, new)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1761) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1762) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1763) 		__entry->dev = mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1764) 		__entry->btnum = btnum;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1765) 		__entry->bno = bno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1766) 		__entry->len = len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1767) 		__entry->diff = diff;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1768) 		__entry->new = new;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1769) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1770) 	TP_printk("dev %d:%d btree %s bno 0x%x len 0x%x diff 0x%x new %d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1771) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1772) 		  __print_symbolic(__entry->btnum, XFS_BTNUM_STRINGS),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1773) 		  __entry->bno, __entry->len, __entry->diff, __entry->new)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1774) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1775) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1776) DECLARE_EVENT_CLASS(xfs_da_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1777) 	TP_PROTO(struct xfs_da_args *args),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1778) 	TP_ARGS(args),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1779) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1780) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1781) 		__field(xfs_ino_t, ino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1782) 		__dynamic_array(char, name, args->namelen)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1783) 		__field(int, namelen)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1784) 		__field(xfs_dahash_t, hashval)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1785) 		__field(xfs_ino_t, inumber)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1786) 		__field(int, op_flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1787) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1788) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1789) 		__entry->dev = VFS_I(args->dp)->i_sb->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1790) 		__entry->ino = args->dp->i_ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1791) 		if (args->namelen)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1792) 			memcpy(__get_str(name), args->name, args->namelen);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1793) 		__entry->namelen = args->namelen;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1794) 		__entry->hashval = args->hashval;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1795) 		__entry->inumber = args->inumber;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1796) 		__entry->op_flags = args->op_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1797) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1798) 	TP_printk("dev %d:%d ino 0x%llx name %.*s namelen %d hashval 0x%x "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1799) 		  "inumber 0x%llx op_flags %s",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1800) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1801) 		  __entry->ino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1802) 		  __entry->namelen,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1803) 		  __entry->namelen ? __get_str(name) : NULL,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1804) 		  __entry->namelen,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1805) 		  __entry->hashval,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1806) 		  __entry->inumber,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1807) 		  __print_flags(__entry->op_flags, "|", XFS_DA_OP_FLAGS))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1808) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1809) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1810) #define DEFINE_DIR2_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1811) DEFINE_EVENT(xfs_da_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1812) 	TP_PROTO(struct xfs_da_args *args), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1813) 	TP_ARGS(args))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1814) DEFINE_DIR2_EVENT(xfs_dir2_sf_addname);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1815) DEFINE_DIR2_EVENT(xfs_dir2_sf_create);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1816) DEFINE_DIR2_EVENT(xfs_dir2_sf_lookup);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1817) DEFINE_DIR2_EVENT(xfs_dir2_sf_replace);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1818) DEFINE_DIR2_EVENT(xfs_dir2_sf_removename);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1819) DEFINE_DIR2_EVENT(xfs_dir2_sf_toino4);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1820) DEFINE_DIR2_EVENT(xfs_dir2_sf_toino8);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1821) DEFINE_DIR2_EVENT(xfs_dir2_sf_to_block);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1822) DEFINE_DIR2_EVENT(xfs_dir2_block_addname);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1823) DEFINE_DIR2_EVENT(xfs_dir2_block_lookup);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1824) DEFINE_DIR2_EVENT(xfs_dir2_block_replace);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1825) DEFINE_DIR2_EVENT(xfs_dir2_block_removename);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1826) DEFINE_DIR2_EVENT(xfs_dir2_block_to_sf);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1827) DEFINE_DIR2_EVENT(xfs_dir2_block_to_leaf);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1828) DEFINE_DIR2_EVENT(xfs_dir2_leaf_addname);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1829) DEFINE_DIR2_EVENT(xfs_dir2_leaf_lookup);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1830) DEFINE_DIR2_EVENT(xfs_dir2_leaf_replace);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1831) DEFINE_DIR2_EVENT(xfs_dir2_leaf_removename);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1832) DEFINE_DIR2_EVENT(xfs_dir2_leaf_to_block);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1833) DEFINE_DIR2_EVENT(xfs_dir2_leaf_to_node);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1834) DEFINE_DIR2_EVENT(xfs_dir2_node_addname);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1835) DEFINE_DIR2_EVENT(xfs_dir2_node_lookup);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1836) DEFINE_DIR2_EVENT(xfs_dir2_node_replace);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1837) DEFINE_DIR2_EVENT(xfs_dir2_node_removename);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1838) DEFINE_DIR2_EVENT(xfs_dir2_node_to_leaf);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1839) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1840) DECLARE_EVENT_CLASS(xfs_attr_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1841) 	TP_PROTO(struct xfs_da_args *args),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1842) 	TP_ARGS(args),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1843) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1844) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1845) 		__field(xfs_ino_t, ino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1846) 		__dynamic_array(char, name, args->namelen)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1847) 		__field(int, namelen)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1848) 		__field(int, valuelen)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1849) 		__field(xfs_dahash_t, hashval)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1850) 		__field(unsigned int, attr_filter)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1851) 		__field(unsigned int, attr_flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1852) 		__field(int, op_flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1853) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1854) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1855) 		__entry->dev = VFS_I(args->dp)->i_sb->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1856) 		__entry->ino = args->dp->i_ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1857) 		if (args->namelen)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1858) 			memcpy(__get_str(name), args->name, args->namelen);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1859) 		__entry->namelen = args->namelen;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1860) 		__entry->valuelen = args->valuelen;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1861) 		__entry->hashval = args->hashval;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1862) 		__entry->attr_filter = args->attr_filter;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1863) 		__entry->attr_flags = args->attr_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1864) 		__entry->op_flags = args->op_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1865) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1866) 	TP_printk("dev %d:%d ino 0x%llx name %.*s namelen %d valuelen %d "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1867) 		  "hashval 0x%x filter %s flags %s op_flags %s",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1868) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1869) 		  __entry->ino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1870) 		  __entry->namelen,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1871) 		  __entry->namelen ? __get_str(name) : NULL,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1872) 		  __entry->namelen,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1873) 		  __entry->valuelen,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1874) 		  __entry->hashval,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1875) 		  __print_flags(__entry->attr_filter, "|",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1876) 				XFS_ATTR_FILTER_FLAGS),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1877) 		   __print_flags(__entry->attr_flags, "|",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1878) 				{ XATTR_CREATE,		"CREATE" },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1879) 				{ XATTR_REPLACE,	"REPLACE" }),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1880) 		  __print_flags(__entry->op_flags, "|", XFS_DA_OP_FLAGS))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1881) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1882) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1883) #define DEFINE_ATTR_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1884) DEFINE_EVENT(xfs_attr_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1885) 	TP_PROTO(struct xfs_da_args *args), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1886) 	TP_ARGS(args))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1887) DEFINE_ATTR_EVENT(xfs_attr_sf_add);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1888) DEFINE_ATTR_EVENT(xfs_attr_sf_addname);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1889) DEFINE_ATTR_EVENT(xfs_attr_sf_create);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1890) DEFINE_ATTR_EVENT(xfs_attr_sf_lookup);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1891) DEFINE_ATTR_EVENT(xfs_attr_sf_remove);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1892) DEFINE_ATTR_EVENT(xfs_attr_sf_to_leaf);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1893) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1894) DEFINE_ATTR_EVENT(xfs_attr_leaf_add);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1895) DEFINE_ATTR_EVENT(xfs_attr_leaf_add_old);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1896) DEFINE_ATTR_EVENT(xfs_attr_leaf_add_new);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1897) DEFINE_ATTR_EVENT(xfs_attr_leaf_add_work);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1898) DEFINE_ATTR_EVENT(xfs_attr_leaf_addname);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1899) DEFINE_ATTR_EVENT(xfs_attr_leaf_create);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1900) DEFINE_ATTR_EVENT(xfs_attr_leaf_compact);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1901) DEFINE_ATTR_EVENT(xfs_attr_leaf_get);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1902) DEFINE_ATTR_EVENT(xfs_attr_leaf_lookup);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1903) DEFINE_ATTR_EVENT(xfs_attr_leaf_replace);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1904) DEFINE_ATTR_EVENT(xfs_attr_leaf_remove);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1905) DEFINE_ATTR_EVENT(xfs_attr_leaf_removename);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1906) DEFINE_ATTR_EVENT(xfs_attr_leaf_split);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1907) DEFINE_ATTR_EVENT(xfs_attr_leaf_split_before);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1908) DEFINE_ATTR_EVENT(xfs_attr_leaf_split_after);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1909) DEFINE_ATTR_EVENT(xfs_attr_leaf_clearflag);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1910) DEFINE_ATTR_EVENT(xfs_attr_leaf_setflag);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1911) DEFINE_ATTR_EVENT(xfs_attr_leaf_flipflags);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1912) DEFINE_ATTR_EVENT(xfs_attr_leaf_to_sf);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1913) DEFINE_ATTR_EVENT(xfs_attr_leaf_to_node);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1914) DEFINE_ATTR_EVENT(xfs_attr_leaf_rebalance);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1915) DEFINE_ATTR_EVENT(xfs_attr_leaf_unbalance);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1916) DEFINE_ATTR_EVENT(xfs_attr_leaf_toosmall);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1917) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1918) DEFINE_ATTR_EVENT(xfs_attr_node_addname);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1919) DEFINE_ATTR_EVENT(xfs_attr_node_get);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1920) DEFINE_ATTR_EVENT(xfs_attr_node_replace);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1921) DEFINE_ATTR_EVENT(xfs_attr_node_removename);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1922) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1923) DEFINE_ATTR_EVENT(xfs_attr_fillstate);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1924) DEFINE_ATTR_EVENT(xfs_attr_refillstate);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1925) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1926) DEFINE_ATTR_EVENT(xfs_attr_rmtval_get);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1927) DEFINE_ATTR_EVENT(xfs_attr_rmtval_set);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1928) DEFINE_ATTR_EVENT(xfs_attr_rmtval_remove);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1929) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1930) #define DEFINE_DA_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1931) DEFINE_EVENT(xfs_da_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1932) 	TP_PROTO(struct xfs_da_args *args), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1933) 	TP_ARGS(args))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1934) DEFINE_DA_EVENT(xfs_da_split);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1935) DEFINE_DA_EVENT(xfs_da_join);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1936) DEFINE_DA_EVENT(xfs_da_link_before);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1937) DEFINE_DA_EVENT(xfs_da_link_after);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1938) DEFINE_DA_EVENT(xfs_da_unlink_back);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1939) DEFINE_DA_EVENT(xfs_da_unlink_forward);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1940) DEFINE_DA_EVENT(xfs_da_root_split);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1941) DEFINE_DA_EVENT(xfs_da_root_join);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1942) DEFINE_DA_EVENT(xfs_da_node_add);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1943) DEFINE_DA_EVENT(xfs_da_node_create);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1944) DEFINE_DA_EVENT(xfs_da_node_split);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1945) DEFINE_DA_EVENT(xfs_da_node_remove);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1946) DEFINE_DA_EVENT(xfs_da_node_rebalance);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1947) DEFINE_DA_EVENT(xfs_da_node_unbalance);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1948) DEFINE_DA_EVENT(xfs_da_node_toosmall);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1949) DEFINE_DA_EVENT(xfs_da_swap_lastblock);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1950) DEFINE_DA_EVENT(xfs_da_grow_inode);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1951) DEFINE_DA_EVENT(xfs_da_shrink_inode);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1952) DEFINE_DA_EVENT(xfs_da_fixhashpath);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1953) DEFINE_DA_EVENT(xfs_da_path_shift);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1954) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1955) DECLARE_EVENT_CLASS(xfs_dir2_space_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1956) 	TP_PROTO(struct xfs_da_args *args, int idx),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1957) 	TP_ARGS(args, idx),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1958) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1959) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1960) 		__field(xfs_ino_t, ino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1961) 		__field(int, op_flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1962) 		__field(int, idx)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1963) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1964) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1965) 		__entry->dev = VFS_I(args->dp)->i_sb->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1966) 		__entry->ino = args->dp->i_ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1967) 		__entry->op_flags = args->op_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1968) 		__entry->idx = idx;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1969) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1970) 	TP_printk("dev %d:%d ino 0x%llx op_flags %s index %d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1971) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1972) 		  __entry->ino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1973) 		  __print_flags(__entry->op_flags, "|", XFS_DA_OP_FLAGS),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1974) 		  __entry->idx)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1975) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1976) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1977) #define DEFINE_DIR2_SPACE_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1978) DEFINE_EVENT(xfs_dir2_space_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1979) 	TP_PROTO(struct xfs_da_args *args, int idx), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1980) 	TP_ARGS(args, idx))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1981) DEFINE_DIR2_SPACE_EVENT(xfs_dir2_leafn_add);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1982) DEFINE_DIR2_SPACE_EVENT(xfs_dir2_leafn_remove);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1983) DEFINE_DIR2_SPACE_EVENT(xfs_dir2_grow_inode);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1984) DEFINE_DIR2_SPACE_EVENT(xfs_dir2_shrink_inode);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1985) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1986) TRACE_EVENT(xfs_dir2_leafn_moveents,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1987) 	TP_PROTO(struct xfs_da_args *args, int src_idx, int dst_idx, int count),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1988) 	TP_ARGS(args, src_idx, dst_idx, count),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1989) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1990) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1991) 		__field(xfs_ino_t, ino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1992) 		__field(int, op_flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1993) 		__field(int, src_idx)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1994) 		__field(int, dst_idx)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1995) 		__field(int, count)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1996) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1997) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1998) 		__entry->dev = VFS_I(args->dp)->i_sb->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1999) 		__entry->ino = args->dp->i_ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2000) 		__entry->op_flags = args->op_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2001) 		__entry->src_idx = src_idx;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2002) 		__entry->dst_idx = dst_idx;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2003) 		__entry->count = count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2004) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2005) 	TP_printk("dev %d:%d ino 0x%llx op_flags %s "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2006) 		  "src_idx %d dst_idx %d count %d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2007) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2008) 		  __entry->ino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2009) 		  __print_flags(__entry->op_flags, "|", XFS_DA_OP_FLAGS),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2010) 		  __entry->src_idx,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2011) 		  __entry->dst_idx,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2012) 		  __entry->count)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2013) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2014) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2015) #define XFS_SWAPEXT_INODES \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2016) 	{ 0,	"target" }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2017) 	{ 1,	"temp" }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2018) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2019) TRACE_DEFINE_ENUM(XFS_DINODE_FMT_DEV);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2020) TRACE_DEFINE_ENUM(XFS_DINODE_FMT_LOCAL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2021) TRACE_DEFINE_ENUM(XFS_DINODE_FMT_EXTENTS);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2022) TRACE_DEFINE_ENUM(XFS_DINODE_FMT_BTREE);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2023) TRACE_DEFINE_ENUM(XFS_DINODE_FMT_UUID);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2024) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2025) DECLARE_EVENT_CLASS(xfs_swap_extent_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2026) 	TP_PROTO(struct xfs_inode *ip, int which),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2027) 	TP_ARGS(ip, which),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2028) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2029) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2030) 		__field(int, which)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2031) 		__field(xfs_ino_t, ino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2032) 		__field(int, format)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2033) 		__field(int, nex)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2034) 		__field(int, broot_size)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2035) 		__field(int, fork_off)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2036) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2037) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2038) 		__entry->dev = VFS_I(ip)->i_sb->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2039) 		__entry->which = which;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2040) 		__entry->ino = ip->i_ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2041) 		__entry->format = ip->i_df.if_format;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2042) 		__entry->nex = ip->i_df.if_nextents;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2043) 		__entry->broot_size = ip->i_df.if_broot_bytes;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2044) 		__entry->fork_off = XFS_IFORK_BOFF(ip);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2045) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2046) 	TP_printk("dev %d:%d ino 0x%llx (%s), %s format, num_extents %d, "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2047) 		  "broot size %d, fork offset %d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2048) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2049) 		  __entry->ino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2050) 		  __print_symbolic(__entry->which, XFS_SWAPEXT_INODES),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2051) 		  __print_symbolic(__entry->format, XFS_INODE_FORMAT_STR),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2052) 		  __entry->nex,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2053) 		  __entry->broot_size,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2054) 		  __entry->fork_off)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2055) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2056) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2057) #define DEFINE_SWAPEXT_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2058) DEFINE_EVENT(xfs_swap_extent_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2059) 	TP_PROTO(struct xfs_inode *ip, int which), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2060) 	TP_ARGS(ip, which))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2061) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2062) DEFINE_SWAPEXT_EVENT(xfs_swap_extent_before);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2063) DEFINE_SWAPEXT_EVENT(xfs_swap_extent_after);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2064) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2065) TRACE_EVENT(xfs_log_recover,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2066) 	TP_PROTO(struct xlog *log, xfs_daddr_t headblk, xfs_daddr_t tailblk),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2067) 	TP_ARGS(log, headblk, tailblk),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2068) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2069) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2070) 		__field(xfs_daddr_t, headblk)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2071) 		__field(xfs_daddr_t, tailblk)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2072) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2073) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2074) 		__entry->dev = log->l_mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2075) 		__entry->headblk = headblk;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2076) 		__entry->tailblk = tailblk;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2077) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2078) 	TP_printk("dev %d:%d headblk 0x%llx tailblk 0x%llx",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2079) 		  MAJOR(__entry->dev), MINOR(__entry->dev), __entry->headblk,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2080) 		  __entry->tailblk)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2081) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2082) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2083) TRACE_EVENT(xfs_log_recover_record,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2084) 	TP_PROTO(struct xlog *log, struct xlog_rec_header *rhead, int pass),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2085) 	TP_ARGS(log, rhead, pass),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2086) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2087) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2088) 		__field(xfs_lsn_t, lsn)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2089) 		__field(int, len)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2090) 		__field(int, num_logops)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2091) 		__field(int, pass)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2092) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2093) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2094) 		__entry->dev = log->l_mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2095) 		__entry->lsn = be64_to_cpu(rhead->h_lsn);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2096) 		__entry->len = be32_to_cpu(rhead->h_len);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2097) 		__entry->num_logops = be32_to_cpu(rhead->h_num_logops);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2098) 		__entry->pass = pass;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2099) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2100) 	TP_printk("dev %d:%d lsn 0x%llx len 0x%x num_logops 0x%x pass %d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2101) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2102) 		  __entry->lsn, __entry->len, __entry->num_logops,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2103) 		   __entry->pass)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2104) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2105) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2106) DECLARE_EVENT_CLASS(xfs_log_recover_item_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2107) 	TP_PROTO(struct xlog *log, struct xlog_recover *trans,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2108) 		struct xlog_recover_item *item, int pass),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2109) 	TP_ARGS(log, trans, item, pass),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2110) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2111) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2112) 		__field(unsigned long, item)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2113) 		__field(xlog_tid_t, tid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2114) 		__field(xfs_lsn_t, lsn)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2115) 		__field(int, type)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2116) 		__field(int, pass)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2117) 		__field(int, count)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2118) 		__field(int, total)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2119) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2120) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2121) 		__entry->dev = log->l_mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2122) 		__entry->item = (unsigned long)item;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2123) 		__entry->tid = trans->r_log_tid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2124) 		__entry->lsn = trans->r_lsn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2125) 		__entry->type = ITEM_TYPE(item);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2126) 		__entry->pass = pass;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2127) 		__entry->count = item->ri_cnt;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2128) 		__entry->total = item->ri_total;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2129) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2130) 	TP_printk("dev %d:%d tid 0x%x lsn 0x%llx, pass %d, item %p, "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2131) 		  "item type %s item region count/total %d/%d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2132) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2133) 		  __entry->tid,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2134) 		  __entry->lsn,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2135) 		  __entry->pass,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2136) 		  (void *)__entry->item,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2137) 		  __print_symbolic(__entry->type, XFS_LI_TYPE_DESC),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2138) 		  __entry->count,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2139) 		  __entry->total)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2140) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2141) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2142) #define DEFINE_LOG_RECOVER_ITEM(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2143) DEFINE_EVENT(xfs_log_recover_item_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2144) 	TP_PROTO(struct xlog *log, struct xlog_recover *trans, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2145) 		struct xlog_recover_item *item, int pass), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2146) 	TP_ARGS(log, trans, item, pass))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2147) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2148) DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_add);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2149) DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_add_cont);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2150) DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_reorder_head);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2151) DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_reorder_tail);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2152) DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_recover);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2153) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2154) DECLARE_EVENT_CLASS(xfs_log_recover_buf_item_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2155) 	TP_PROTO(struct xlog *log, struct xfs_buf_log_format *buf_f),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2156) 	TP_ARGS(log, buf_f),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2157) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2158) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2159) 		__field(int64_t, blkno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2160) 		__field(unsigned short, len)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2161) 		__field(unsigned short, flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2162) 		__field(unsigned short, size)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2163) 		__field(unsigned int, map_size)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2164) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2165) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2166) 		__entry->dev = log->l_mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2167) 		__entry->blkno = buf_f->blf_blkno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2168) 		__entry->len = buf_f->blf_len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2169) 		__entry->flags = buf_f->blf_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2170) 		__entry->size = buf_f->blf_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2171) 		__entry->map_size = buf_f->blf_map_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2172) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2173) 	TP_printk("dev %d:%d blkno 0x%llx, len %u, flags 0x%x, size %d, "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2174) 			"map_size %d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2175) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2176) 		  __entry->blkno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2177) 		  __entry->len,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2178) 		  __entry->flags,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2179) 		  __entry->size,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2180) 		  __entry->map_size)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2181) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2182) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2183) #define DEFINE_LOG_RECOVER_BUF_ITEM(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2184) DEFINE_EVENT(xfs_log_recover_buf_item_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2185) 	TP_PROTO(struct xlog *log, struct xfs_buf_log_format *buf_f), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2186) 	TP_ARGS(log, buf_f))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2187) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2188) DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_not_cancel);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2189) DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_cancel);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2190) DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_cancel_add);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2191) DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_cancel_ref_inc);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2192) DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_recover);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2193) DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_skip);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2194) DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_inode_buf);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2195) DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_reg_buf);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2196) DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_dquot_buf);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2197) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2198) DECLARE_EVENT_CLASS(xfs_log_recover_ino_item_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2199) 	TP_PROTO(struct xlog *log, struct xfs_inode_log_format *in_f),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2200) 	TP_ARGS(log, in_f),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2201) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2202) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2203) 		__field(xfs_ino_t, ino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2204) 		__field(unsigned short, size)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2205) 		__field(int, fields)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2206) 		__field(unsigned short, asize)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2207) 		__field(unsigned short, dsize)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2208) 		__field(int64_t, blkno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2209) 		__field(int, len)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2210) 		__field(int, boffset)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2211) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2212) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2213) 		__entry->dev = log->l_mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2214) 		__entry->ino = in_f->ilf_ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2215) 		__entry->size = in_f->ilf_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2216) 		__entry->fields = in_f->ilf_fields;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2217) 		__entry->asize = in_f->ilf_asize;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2218) 		__entry->dsize = in_f->ilf_dsize;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2219) 		__entry->blkno = in_f->ilf_blkno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2220) 		__entry->len = in_f->ilf_len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2221) 		__entry->boffset = in_f->ilf_boffset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2222) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2223) 	TP_printk("dev %d:%d ino 0x%llx, size %u, fields 0x%x, asize %d, "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2224) 			"dsize %d, blkno 0x%llx, len %d, boffset %d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2225) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2226) 		  __entry->ino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2227) 		  __entry->size,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2228) 		  __entry->fields,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2229) 		  __entry->asize,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2230) 		  __entry->dsize,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2231) 		  __entry->blkno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2232) 		  __entry->len,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2233) 		  __entry->boffset)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2234) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2235) #define DEFINE_LOG_RECOVER_INO_ITEM(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2236) DEFINE_EVENT(xfs_log_recover_ino_item_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2237) 	TP_PROTO(struct xlog *log, struct xfs_inode_log_format *in_f), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2238) 	TP_ARGS(log, in_f))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2239) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2240) DEFINE_LOG_RECOVER_INO_ITEM(xfs_log_recover_inode_recover);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2241) DEFINE_LOG_RECOVER_INO_ITEM(xfs_log_recover_inode_cancel);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2242) DEFINE_LOG_RECOVER_INO_ITEM(xfs_log_recover_inode_skip);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2243) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2244) DECLARE_EVENT_CLASS(xfs_log_recover_icreate_item_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2245) 	TP_PROTO(struct xlog *log, struct xfs_icreate_log *in_f),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2246) 	TP_ARGS(log, in_f),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2247) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2248) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2249) 		__field(xfs_agnumber_t, agno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2250) 		__field(xfs_agblock_t, agbno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2251) 		__field(unsigned int, count)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2252) 		__field(unsigned int, isize)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2253) 		__field(xfs_agblock_t, length)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2254) 		__field(unsigned int, gen)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2255) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2256) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2257) 		__entry->dev = log->l_mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2258) 		__entry->agno = be32_to_cpu(in_f->icl_ag);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2259) 		__entry->agbno = be32_to_cpu(in_f->icl_agbno);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2260) 		__entry->count = be32_to_cpu(in_f->icl_count);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2261) 		__entry->isize = be32_to_cpu(in_f->icl_isize);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2262) 		__entry->length = be32_to_cpu(in_f->icl_length);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2263) 		__entry->gen = be32_to_cpu(in_f->icl_gen);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2264) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2265) 	TP_printk("dev %d:%d agno %u agbno %u count %u isize %u length %u "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2266) 		  "gen %u", MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2267) 		  __entry->agno, __entry->agbno, __entry->count, __entry->isize,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2268) 		  __entry->length, __entry->gen)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2269) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2270) #define DEFINE_LOG_RECOVER_ICREATE_ITEM(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2271) DEFINE_EVENT(xfs_log_recover_icreate_item_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2272) 	TP_PROTO(struct xlog *log, struct xfs_icreate_log *in_f), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2273) 	TP_ARGS(log, in_f))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2274) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2275) DEFINE_LOG_RECOVER_ICREATE_ITEM(xfs_log_recover_icreate_cancel);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2276) DEFINE_LOG_RECOVER_ICREATE_ITEM(xfs_log_recover_icreate_recover);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2277) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2278) DECLARE_EVENT_CLASS(xfs_discard_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2279) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2280) 		 xfs_agblock_t agbno, xfs_extlen_t len),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2281) 	TP_ARGS(mp, agno, agbno, len),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2282) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2283) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2284) 		__field(xfs_agnumber_t, agno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2285) 		__field(xfs_agblock_t, agbno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2286) 		__field(xfs_extlen_t, len)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2287) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2288) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2289) 		__entry->dev = mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2290) 		__entry->agno = agno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2291) 		__entry->agbno = agbno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2292) 		__entry->len = len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2293) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2294) 	TP_printk("dev %d:%d agno %u agbno %u len %u",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2295) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2296) 		  __entry->agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2297) 		  __entry->agbno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2298) 		  __entry->len)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2299) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2300) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2301) #define DEFINE_DISCARD_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2302) DEFINE_EVENT(xfs_discard_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2303) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2304) 		 xfs_agblock_t agbno, xfs_extlen_t len), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2305) 	TP_ARGS(mp, agno, agbno, len))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2306) DEFINE_DISCARD_EVENT(xfs_discard_extent);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2307) DEFINE_DISCARD_EVENT(xfs_discard_toosmall);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2308) DEFINE_DISCARD_EVENT(xfs_discard_exclude);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2309) DEFINE_DISCARD_EVENT(xfs_discard_busy);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2310) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2311) /* btree cursor events */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2312) TRACE_DEFINE_ENUM(XFS_BTNUM_BNOi);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2313) TRACE_DEFINE_ENUM(XFS_BTNUM_CNTi);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2314) TRACE_DEFINE_ENUM(XFS_BTNUM_BMAPi);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2315) TRACE_DEFINE_ENUM(XFS_BTNUM_INOi);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2316) TRACE_DEFINE_ENUM(XFS_BTNUM_FINOi);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2317) TRACE_DEFINE_ENUM(XFS_BTNUM_RMAPi);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2318) TRACE_DEFINE_ENUM(XFS_BTNUM_REFCi);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2319) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2320) DECLARE_EVENT_CLASS(xfs_btree_cur_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2321) 	TP_PROTO(struct xfs_btree_cur *cur, int level, struct xfs_buf *bp),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2322) 	TP_ARGS(cur, level, bp),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2323) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2324) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2325) 		__field(xfs_btnum_t, btnum)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2326) 		__field(int, level)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2327) 		__field(int, nlevels)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2328) 		__field(int, ptr)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2329) 		__field(xfs_daddr_t, daddr)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2330) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2331) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2332) 		__entry->dev = cur->bc_mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2333) 		__entry->btnum = cur->bc_btnum;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2334) 		__entry->level = level;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2335) 		__entry->nlevels = cur->bc_nlevels;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2336) 		__entry->ptr = cur->bc_ptrs[level];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2337) 		__entry->daddr = bp ? bp->b_bn : -1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2338) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2339) 	TP_printk("dev %d:%d btree %s level %d/%d ptr %d daddr 0x%llx",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2340) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2341) 		  __print_symbolic(__entry->btnum, XFS_BTNUM_STRINGS),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2342) 		  __entry->level,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2343) 		  __entry->nlevels,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2344) 		  __entry->ptr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2345) 		  (unsigned long long)__entry->daddr)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2346) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2347) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2348) #define DEFINE_BTREE_CUR_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2349) DEFINE_EVENT(xfs_btree_cur_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2350) 	TP_PROTO(struct xfs_btree_cur *cur, int level, struct xfs_buf *bp), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2351) 	TP_ARGS(cur, level, bp))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2352) DEFINE_BTREE_CUR_EVENT(xfs_btree_updkeys);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2353) DEFINE_BTREE_CUR_EVENT(xfs_btree_overlapped_query_range);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2354) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2355) /* deferred ops */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2356) struct xfs_defer_pending;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2357) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2358) DECLARE_EVENT_CLASS(xfs_defer_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2359) 	TP_PROTO(struct xfs_trans *tp, unsigned long caller_ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2360) 	TP_ARGS(tp, caller_ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2361) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2362) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2363) 		__field(struct xfs_trans *, tp)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2364) 		__field(char, committed)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2365) 		__field(unsigned long, caller_ip)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2366) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2367) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2368) 		__entry->dev = tp->t_mountp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2369) 		__entry->tp = tp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2370) 		__entry->caller_ip = caller_ip;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2371) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2372) 	TP_printk("dev %d:%d tp %p caller %pS",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2373) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2374) 		  __entry->tp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2375) 		  (char *)__entry->caller_ip)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2376) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2377) #define DEFINE_DEFER_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2378) DEFINE_EVENT(xfs_defer_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2379) 	TP_PROTO(struct xfs_trans *tp, unsigned long caller_ip), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2380) 	TP_ARGS(tp, caller_ip))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2381) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2382) DECLARE_EVENT_CLASS(xfs_defer_error_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2383) 	TP_PROTO(struct xfs_trans *tp, int error),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2384) 	TP_ARGS(tp, error),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2385) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2386) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2387) 		__field(struct xfs_trans *, tp)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2388) 		__field(char, committed)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2389) 		__field(int, error)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2390) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2391) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2392) 		__entry->dev = tp->t_mountp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2393) 		__entry->tp = tp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2394) 		__entry->error = error;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2395) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2396) 	TP_printk("dev %d:%d tp %p err %d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2397) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2398) 		  __entry->tp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2399) 		  __entry->error)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2400) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2401) #define DEFINE_DEFER_ERROR_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2402) DEFINE_EVENT(xfs_defer_error_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2403) 	TP_PROTO(struct xfs_trans *tp, int error), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2404) 	TP_ARGS(tp, error))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2405) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2406) DECLARE_EVENT_CLASS(xfs_defer_pending_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2407) 	TP_PROTO(struct xfs_mount *mp, struct xfs_defer_pending *dfp),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2408) 	TP_ARGS(mp, dfp),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2409) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2410) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2411) 		__field(int, type)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2412) 		__field(void *, intent)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2413) 		__field(char, committed)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2414) 		__field(int, nr)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2415) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2416) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2417) 		__entry->dev = mp ? mp->m_super->s_dev : 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2418) 		__entry->type = dfp->dfp_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2419) 		__entry->intent = dfp->dfp_intent;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2420) 		__entry->committed = dfp->dfp_done != NULL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2421) 		__entry->nr = dfp->dfp_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2422) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2423) 	TP_printk("dev %d:%d optype %d intent %p committed %d nr %d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2424) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2425) 		  __entry->type,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2426) 		  __entry->intent,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2427) 		  __entry->committed,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2428) 		  __entry->nr)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2429) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2430) #define DEFINE_DEFER_PENDING_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2431) DEFINE_EVENT(xfs_defer_pending_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2432) 	TP_PROTO(struct xfs_mount *mp, struct xfs_defer_pending *dfp), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2433) 	TP_ARGS(mp, dfp))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2434) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2435) DECLARE_EVENT_CLASS(xfs_phys_extent_deferred_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2436) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2437) 		 int type, xfs_agblock_t agbno, xfs_extlen_t len),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2438) 	TP_ARGS(mp, agno, type, agbno, len),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2439) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2440) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2441) 		__field(xfs_agnumber_t, agno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2442) 		__field(int, type)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2443) 		__field(xfs_agblock_t, agbno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2444) 		__field(xfs_extlen_t, len)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2445) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2446) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2447) 		__entry->dev = mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2448) 		__entry->agno = agno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2449) 		__entry->type = type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2450) 		__entry->agbno = agbno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2451) 		__entry->len = len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2452) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2453) 	TP_printk("dev %d:%d op %d agno %u agbno %u len %u",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2454) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2455) 		  __entry->type,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2456) 		  __entry->agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2457) 		  __entry->agbno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2458) 		  __entry->len)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2459) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2460) #define DEFINE_PHYS_EXTENT_DEFERRED_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2461) DEFINE_EVENT(xfs_phys_extent_deferred_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2462) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2463) 		 int type, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2464) 		 xfs_agblock_t bno, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2465) 		 xfs_extlen_t len), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2466) 	TP_ARGS(mp, agno, type, bno, len))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2467) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2468) DECLARE_EVENT_CLASS(xfs_map_extent_deferred_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2469) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2470) 		 int op,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2471) 		 xfs_agblock_t agbno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2472) 		 xfs_ino_t ino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2473) 		 int whichfork,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2474) 		 xfs_fileoff_t offset,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2475) 		 xfs_filblks_t len,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2476) 		 xfs_exntst_t state),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2477) 	TP_ARGS(mp, agno, op, agbno, ino, whichfork, offset, len, state),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2478) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2479) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2480) 		__field(xfs_agnumber_t, agno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2481) 		__field(xfs_ino_t, ino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2482) 		__field(xfs_agblock_t, agbno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2483) 		__field(int, whichfork)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2484) 		__field(xfs_fileoff_t, l_loff)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2485) 		__field(xfs_filblks_t, l_len)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2486) 		__field(xfs_exntst_t, l_state)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2487) 		__field(int, op)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2488) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2489) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2490) 		__entry->dev = mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2491) 		__entry->agno = agno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2492) 		__entry->ino = ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2493) 		__entry->agbno = agbno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2494) 		__entry->whichfork = whichfork;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2495) 		__entry->l_loff = offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2496) 		__entry->l_len = len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2497) 		__entry->l_state = state;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2498) 		__entry->op = op;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2499) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2500) 	TP_printk("dev %d:%d op %d agno %u agbno %u owner %lld %s offset %llu len %llu state %d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2501) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2502) 		  __entry->op,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2503) 		  __entry->agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2504) 		  __entry->agbno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2505) 		  __entry->ino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2506) 		  __entry->whichfork == XFS_ATTR_FORK ? "attr" : "data",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2507) 		  __entry->l_loff,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2508) 		  __entry->l_len,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2509) 		  __entry->l_state)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2510) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2511) #define DEFINE_MAP_EXTENT_DEFERRED_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2512) DEFINE_EVENT(xfs_map_extent_deferred_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2513) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2514) 		 int op, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2515) 		 xfs_agblock_t agbno, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2516) 		 xfs_ino_t ino, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2517) 		 int whichfork, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2518) 		 xfs_fileoff_t offset, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2519) 		 xfs_filblks_t len, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2520) 		 xfs_exntst_t state), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2521) 	TP_ARGS(mp, agno, op, agbno, ino, whichfork, offset, len, state))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2522) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2523) DEFINE_DEFER_EVENT(xfs_defer_cancel);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2524) DEFINE_DEFER_EVENT(xfs_defer_trans_roll);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2525) DEFINE_DEFER_EVENT(xfs_defer_trans_abort);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2526) DEFINE_DEFER_EVENT(xfs_defer_finish);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2527) DEFINE_DEFER_EVENT(xfs_defer_finish_done);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2528) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2529) DEFINE_DEFER_ERROR_EVENT(xfs_defer_trans_roll_error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2530) DEFINE_DEFER_ERROR_EVENT(xfs_defer_finish_error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2531) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2532) DEFINE_DEFER_PENDING_EVENT(xfs_defer_create_intent);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2533) DEFINE_DEFER_PENDING_EVENT(xfs_defer_cancel_list);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2534) DEFINE_DEFER_PENDING_EVENT(xfs_defer_pending_finish);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2535) DEFINE_DEFER_PENDING_EVENT(xfs_defer_pending_abort);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2536) DEFINE_DEFER_PENDING_EVENT(xfs_defer_relog_intent);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2537) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2538) #define DEFINE_BMAP_FREE_DEFERRED_EVENT DEFINE_PHYS_EXTENT_DEFERRED_EVENT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2539) DEFINE_BMAP_FREE_DEFERRED_EVENT(xfs_bmap_free_defer);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2540) DEFINE_BMAP_FREE_DEFERRED_EVENT(xfs_bmap_free_deferred);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2541) DEFINE_BMAP_FREE_DEFERRED_EVENT(xfs_agfl_free_defer);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2542) DEFINE_BMAP_FREE_DEFERRED_EVENT(xfs_agfl_free_deferred);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2543) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2544) /* rmap tracepoints */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2545) DECLARE_EVENT_CLASS(xfs_rmap_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2546) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2547) 		 xfs_agblock_t agbno, xfs_extlen_t len, bool unwritten,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2548) 		 const struct xfs_owner_info *oinfo),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2549) 	TP_ARGS(mp, agno, agbno, len, unwritten, oinfo),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2550) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2551) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2552) 		__field(xfs_agnumber_t, agno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2553) 		__field(xfs_agblock_t, agbno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2554) 		__field(xfs_extlen_t, len)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2555) 		__field(uint64_t, owner)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2556) 		__field(uint64_t, offset)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2557) 		__field(unsigned long, flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2558) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2559) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2560) 		__entry->dev = mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2561) 		__entry->agno = agno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2562) 		__entry->agbno = agbno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2563) 		__entry->len = len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2564) 		__entry->owner = oinfo->oi_owner;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2565) 		__entry->offset = oinfo->oi_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2566) 		__entry->flags = oinfo->oi_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2567) 		if (unwritten)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2568) 			__entry->flags |= XFS_RMAP_UNWRITTEN;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2569) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2570) 	TP_printk("dev %d:%d agno %u agbno %u len %u owner %lld offset %llu flags 0x%lx",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2571) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2572) 		  __entry->agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2573) 		  __entry->agbno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2574) 		  __entry->len,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2575) 		  __entry->owner,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2576) 		  __entry->offset,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2577) 		  __entry->flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2578) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2579) #define DEFINE_RMAP_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2580) DEFINE_EVENT(xfs_rmap_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2581) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2582) 		 xfs_agblock_t agbno, xfs_extlen_t len, bool unwritten, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2583) 		 const struct xfs_owner_info *oinfo), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2584) 	TP_ARGS(mp, agno, agbno, len, unwritten, oinfo))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2585) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2586) /* simple AG-based error/%ip tracepoint class */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2587) DECLARE_EVENT_CLASS(xfs_ag_error_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2588) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, int error,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2589) 		 unsigned long caller_ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2590) 	TP_ARGS(mp, agno, error, caller_ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2591) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2592) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2593) 		__field(xfs_agnumber_t, agno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2594) 		__field(int, error)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2595) 		__field(unsigned long, caller_ip)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2596) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2597) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2598) 		__entry->dev = mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2599) 		__entry->agno = agno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2600) 		__entry->error = error;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2601) 		__entry->caller_ip = caller_ip;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2602) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2603) 	TP_printk("dev %d:%d agno %u error %d caller %pS",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2604) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2605) 		  __entry->agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2606) 		  __entry->error,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2607) 		  (char *)__entry->caller_ip)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2608) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2609) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2610) #define DEFINE_AG_ERROR_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2611) DEFINE_EVENT(xfs_ag_error_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2612) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, int error, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2613) 		 unsigned long caller_ip), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2614) 	TP_ARGS(mp, agno, error, caller_ip))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2615) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2616) DEFINE_RMAP_EVENT(xfs_rmap_unmap);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2617) DEFINE_RMAP_EVENT(xfs_rmap_unmap_done);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2618) DEFINE_AG_ERROR_EVENT(xfs_rmap_unmap_error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2619) DEFINE_RMAP_EVENT(xfs_rmap_map);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2620) DEFINE_RMAP_EVENT(xfs_rmap_map_done);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2621) DEFINE_AG_ERROR_EVENT(xfs_rmap_map_error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2622) DEFINE_RMAP_EVENT(xfs_rmap_convert);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2623) DEFINE_RMAP_EVENT(xfs_rmap_convert_done);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2624) DEFINE_AG_ERROR_EVENT(xfs_rmap_convert_error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2625) DEFINE_AG_ERROR_EVENT(xfs_rmap_convert_state);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2626) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2627) DECLARE_EVENT_CLASS(xfs_rmapbt_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2628) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2629) 		 xfs_agblock_t agbno, xfs_extlen_t len,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2630) 		 uint64_t owner, uint64_t offset, unsigned int flags),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2631) 	TP_ARGS(mp, agno, agbno, len, owner, offset, flags),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2632) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2633) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2634) 		__field(xfs_agnumber_t, agno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2635) 		__field(xfs_agblock_t, agbno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2636) 		__field(xfs_extlen_t, len)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2637) 		__field(uint64_t, owner)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2638) 		__field(uint64_t, offset)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2639) 		__field(unsigned int, flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2640) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2641) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2642) 		__entry->dev = mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2643) 		__entry->agno = agno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2644) 		__entry->agbno = agbno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2645) 		__entry->len = len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2646) 		__entry->owner = owner;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2647) 		__entry->offset = offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2648) 		__entry->flags = flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2649) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2650) 	TP_printk("dev %d:%d agno %u agbno %u len %u owner %lld offset %llu flags 0x%x",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2651) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2652) 		  __entry->agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2653) 		  __entry->agbno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2654) 		  __entry->len,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2655) 		  __entry->owner,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2656) 		  __entry->offset,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2657) 		  __entry->flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2658) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2659) #define DEFINE_RMAPBT_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2660) DEFINE_EVENT(xfs_rmapbt_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2661) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2662) 		 xfs_agblock_t agbno, xfs_extlen_t len, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2663) 		 uint64_t owner, uint64_t offset, unsigned int flags), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2664) 	TP_ARGS(mp, agno, agbno, len, owner, offset, flags))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2665) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2666) #define DEFINE_RMAP_DEFERRED_EVENT DEFINE_MAP_EXTENT_DEFERRED_EVENT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2667) DEFINE_RMAP_DEFERRED_EVENT(xfs_rmap_defer);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2668) DEFINE_RMAP_DEFERRED_EVENT(xfs_rmap_deferred);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2669) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2670) DEFINE_BUSY_EVENT(xfs_rmapbt_alloc_block);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2671) DEFINE_BUSY_EVENT(xfs_rmapbt_free_block);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2672) DEFINE_RMAPBT_EVENT(xfs_rmap_update);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2673) DEFINE_RMAPBT_EVENT(xfs_rmap_insert);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2674) DEFINE_RMAPBT_EVENT(xfs_rmap_delete);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2675) DEFINE_AG_ERROR_EVENT(xfs_rmap_insert_error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2676) DEFINE_AG_ERROR_EVENT(xfs_rmap_delete_error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2677) DEFINE_AG_ERROR_EVENT(xfs_rmap_update_error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2678) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2679) DEFINE_RMAPBT_EVENT(xfs_rmap_find_left_neighbor_candidate);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2680) DEFINE_RMAPBT_EVENT(xfs_rmap_find_left_neighbor_query);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2681) DEFINE_RMAPBT_EVENT(xfs_rmap_lookup_le_range_candidate);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2682) DEFINE_RMAPBT_EVENT(xfs_rmap_lookup_le_range);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2683) DEFINE_RMAPBT_EVENT(xfs_rmap_lookup_le_range_result);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2684) DEFINE_RMAPBT_EVENT(xfs_rmap_find_right_neighbor_result);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2685) DEFINE_RMAPBT_EVENT(xfs_rmap_find_left_neighbor_result);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2686) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2687) /* deferred bmbt updates */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2688) #define DEFINE_BMAP_DEFERRED_EVENT	DEFINE_RMAP_DEFERRED_EVENT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2689) DEFINE_BMAP_DEFERRED_EVENT(xfs_bmap_defer);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2690) DEFINE_BMAP_DEFERRED_EVENT(xfs_bmap_deferred);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2691) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2692) /* per-AG reservation */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2693) DECLARE_EVENT_CLASS(xfs_ag_resv_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2694) 	TP_PROTO(struct xfs_perag *pag, enum xfs_ag_resv_type resv,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2695) 		 xfs_extlen_t len),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2696) 	TP_ARGS(pag, resv, len),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2697) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2698) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2699) 		__field(xfs_agnumber_t, agno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2700) 		__field(int, resv)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2701) 		__field(xfs_extlen_t, freeblks)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2702) 		__field(xfs_extlen_t, flcount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2703) 		__field(xfs_extlen_t, reserved)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2704) 		__field(xfs_extlen_t, asked)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2705) 		__field(xfs_extlen_t, len)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2706) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2707) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2708) 		struct xfs_ag_resv	*r = xfs_perag_resv(pag, resv);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2709) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2710) 		__entry->dev = pag->pag_mount->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2711) 		__entry->agno = pag->pag_agno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2712) 		__entry->resv = resv;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2713) 		__entry->freeblks = pag->pagf_freeblks;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2714) 		__entry->flcount = pag->pagf_flcount;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2715) 		__entry->reserved = r ? r->ar_reserved : 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2716) 		__entry->asked = r ? r->ar_asked : 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2717) 		__entry->len = len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2718) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2719) 	TP_printk("dev %d:%d agno %u resv %d freeblks %u flcount %u "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2720) 		  "resv %u ask %u len %u",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2721) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2722) 		  __entry->agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2723) 		  __entry->resv,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2724) 		  __entry->freeblks,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2725) 		  __entry->flcount,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2726) 		  __entry->reserved,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2727) 		  __entry->asked,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2728) 		  __entry->len)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2729) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2730) #define DEFINE_AG_RESV_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2731) DEFINE_EVENT(xfs_ag_resv_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2732) 	TP_PROTO(struct xfs_perag *pag, enum xfs_ag_resv_type type, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2733) 		 xfs_extlen_t len), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2734) 	TP_ARGS(pag, type, len))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2735) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2736) /* per-AG reservation tracepoints */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2737) DEFINE_AG_RESV_EVENT(xfs_ag_resv_init);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2738) DEFINE_AG_RESV_EVENT(xfs_ag_resv_free);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2739) DEFINE_AG_RESV_EVENT(xfs_ag_resv_alloc_extent);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2740) DEFINE_AG_RESV_EVENT(xfs_ag_resv_free_extent);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2741) DEFINE_AG_RESV_EVENT(xfs_ag_resv_critical);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2742) DEFINE_AG_RESV_EVENT(xfs_ag_resv_needed);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2743) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2744) DEFINE_AG_ERROR_EVENT(xfs_ag_resv_free_error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2745) DEFINE_AG_ERROR_EVENT(xfs_ag_resv_init_error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2746) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2747) /* refcount tracepoint classes */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2748) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2749) /* reuse the discard trace class for agbno/aglen-based traces */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2750) #define DEFINE_AG_EXTENT_EVENT(name) DEFINE_DISCARD_EVENT(name)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2751) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2752) /* ag btree lookup tracepoint class */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2753) TRACE_DEFINE_ENUM(XFS_LOOKUP_EQi);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2754) TRACE_DEFINE_ENUM(XFS_LOOKUP_LEi);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2755) TRACE_DEFINE_ENUM(XFS_LOOKUP_GEi);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2756) DECLARE_EVENT_CLASS(xfs_ag_btree_lookup_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2757) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2758) 		 xfs_agblock_t agbno, xfs_lookup_t dir),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2759) 	TP_ARGS(mp, agno, agbno, dir),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2760) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2761) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2762) 		__field(xfs_agnumber_t, agno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2763) 		__field(xfs_agblock_t, agbno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2764) 		__field(xfs_lookup_t, dir)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2765) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2766) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2767) 		__entry->dev = mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2768) 		__entry->agno = agno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2769) 		__entry->agbno = agbno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2770) 		__entry->dir = dir;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2771) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2772) 	TP_printk("dev %d:%d agno %u agbno %u cmp %s(%d)",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2773) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2774) 		  __entry->agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2775) 		  __entry->agbno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2776) 		  __print_symbolic(__entry->dir, XFS_AG_BTREE_CMP_FORMAT_STR),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2777) 		  __entry->dir)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2778) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2779) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2780) #define DEFINE_AG_BTREE_LOOKUP_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2781) DEFINE_EVENT(xfs_ag_btree_lookup_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2782) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2783) 		 xfs_agblock_t agbno, xfs_lookup_t dir), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2784) 	TP_ARGS(mp, agno, agbno, dir))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2785) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2786) /* single-rcext tracepoint class */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2787) DECLARE_EVENT_CLASS(xfs_refcount_extent_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2788) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2789) 		 struct xfs_refcount_irec *irec),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2790) 	TP_ARGS(mp, agno, irec),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2791) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2792) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2793) 		__field(xfs_agnumber_t, agno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2794) 		__field(xfs_agblock_t, startblock)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2795) 		__field(xfs_extlen_t, blockcount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2796) 		__field(xfs_nlink_t, refcount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2797) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2798) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2799) 		__entry->dev = mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2800) 		__entry->agno = agno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2801) 		__entry->startblock = irec->rc_startblock;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2802) 		__entry->blockcount = irec->rc_blockcount;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2803) 		__entry->refcount = irec->rc_refcount;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2804) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2805) 	TP_printk("dev %d:%d agno %u agbno %u len %u refcount %u",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2806) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2807) 		  __entry->agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2808) 		  __entry->startblock,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2809) 		  __entry->blockcount,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2810) 		  __entry->refcount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2811) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2812) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2813) #define DEFINE_REFCOUNT_EXTENT_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2814) DEFINE_EVENT(xfs_refcount_extent_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2815) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2816) 		 struct xfs_refcount_irec *irec), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2817) 	TP_ARGS(mp, agno, irec))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2818) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2819) /* single-rcext and an agbno tracepoint class */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2820) DECLARE_EVENT_CLASS(xfs_refcount_extent_at_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2821) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2822) 		 struct xfs_refcount_irec *irec, xfs_agblock_t agbno),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2823) 	TP_ARGS(mp, agno, irec, agbno),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2824) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2825) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2826) 		__field(xfs_agnumber_t, agno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2827) 		__field(xfs_agblock_t, startblock)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2828) 		__field(xfs_extlen_t, blockcount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2829) 		__field(xfs_nlink_t, refcount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2830) 		__field(xfs_agblock_t, agbno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2831) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2832) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2833) 		__entry->dev = mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2834) 		__entry->agno = agno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2835) 		__entry->startblock = irec->rc_startblock;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2836) 		__entry->blockcount = irec->rc_blockcount;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2837) 		__entry->refcount = irec->rc_refcount;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2838) 		__entry->agbno = agbno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2839) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2840) 	TP_printk("dev %d:%d agno %u agbno %u len %u refcount %u @ agbno %u",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2841) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2842) 		  __entry->agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2843) 		  __entry->startblock,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2844) 		  __entry->blockcount,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2845) 		  __entry->refcount,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2846) 		  __entry->agbno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2847) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2848) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2849) #define DEFINE_REFCOUNT_EXTENT_AT_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2850) DEFINE_EVENT(xfs_refcount_extent_at_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2851) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2852) 		 struct xfs_refcount_irec *irec, xfs_agblock_t agbno), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2853) 	TP_ARGS(mp, agno, irec, agbno))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2854) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2855) /* double-rcext tracepoint class */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2856) DECLARE_EVENT_CLASS(xfs_refcount_double_extent_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2857) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2858) 		 struct xfs_refcount_irec *i1, struct xfs_refcount_irec *i2),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2859) 	TP_ARGS(mp, agno, i1, i2),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2860) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2861) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2862) 		__field(xfs_agnumber_t, agno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2863) 		__field(xfs_agblock_t, i1_startblock)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2864) 		__field(xfs_extlen_t, i1_blockcount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2865) 		__field(xfs_nlink_t, i1_refcount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2866) 		__field(xfs_agblock_t, i2_startblock)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2867) 		__field(xfs_extlen_t, i2_blockcount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2868) 		__field(xfs_nlink_t, i2_refcount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2869) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2870) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2871) 		__entry->dev = mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2872) 		__entry->agno = agno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2873) 		__entry->i1_startblock = i1->rc_startblock;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2874) 		__entry->i1_blockcount = i1->rc_blockcount;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2875) 		__entry->i1_refcount = i1->rc_refcount;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2876) 		__entry->i2_startblock = i2->rc_startblock;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2877) 		__entry->i2_blockcount = i2->rc_blockcount;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2878) 		__entry->i2_refcount = i2->rc_refcount;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2879) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2880) 	TP_printk("dev %d:%d agno %u agbno %u len %u refcount %u -- "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2881) 		  "agbno %u len %u refcount %u",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2882) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2883) 		  __entry->agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2884) 		  __entry->i1_startblock,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2885) 		  __entry->i1_blockcount,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2886) 		  __entry->i1_refcount,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2887) 		  __entry->i2_startblock,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2888) 		  __entry->i2_blockcount,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2889) 		  __entry->i2_refcount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2890) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2891) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2892) #define DEFINE_REFCOUNT_DOUBLE_EXTENT_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2893) DEFINE_EVENT(xfs_refcount_double_extent_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2894) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2895) 		 struct xfs_refcount_irec *i1, struct xfs_refcount_irec *i2), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2896) 	TP_ARGS(mp, agno, i1, i2))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2897) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2898) /* double-rcext and an agbno tracepoint class */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2899) DECLARE_EVENT_CLASS(xfs_refcount_double_extent_at_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2900) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2901) 		 struct xfs_refcount_irec *i1, struct xfs_refcount_irec *i2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2902) 		 xfs_agblock_t agbno),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2903) 	TP_ARGS(mp, agno, i1, i2, agbno),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2904) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2905) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2906) 		__field(xfs_agnumber_t, agno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2907) 		__field(xfs_agblock_t, i1_startblock)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2908) 		__field(xfs_extlen_t, i1_blockcount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2909) 		__field(xfs_nlink_t, i1_refcount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2910) 		__field(xfs_agblock_t, i2_startblock)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2911) 		__field(xfs_extlen_t, i2_blockcount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2912) 		__field(xfs_nlink_t, i2_refcount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2913) 		__field(xfs_agblock_t, agbno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2914) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2915) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2916) 		__entry->dev = mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2917) 		__entry->agno = agno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2918) 		__entry->i1_startblock = i1->rc_startblock;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2919) 		__entry->i1_blockcount = i1->rc_blockcount;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2920) 		__entry->i1_refcount = i1->rc_refcount;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2921) 		__entry->i2_startblock = i2->rc_startblock;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2922) 		__entry->i2_blockcount = i2->rc_blockcount;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2923) 		__entry->i2_refcount = i2->rc_refcount;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2924) 		__entry->agbno = agbno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2925) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2926) 	TP_printk("dev %d:%d agno %u agbno %u len %u refcount %u -- "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2927) 		  "agbno %u len %u refcount %u @ agbno %u",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2928) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2929) 		  __entry->agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2930) 		  __entry->i1_startblock,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2931) 		  __entry->i1_blockcount,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2932) 		  __entry->i1_refcount,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2933) 		  __entry->i2_startblock,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2934) 		  __entry->i2_blockcount,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2935) 		  __entry->i2_refcount,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2936) 		  __entry->agbno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2937) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2938) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2939) #define DEFINE_REFCOUNT_DOUBLE_EXTENT_AT_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2940) DEFINE_EVENT(xfs_refcount_double_extent_at_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2941) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2942) 		 struct xfs_refcount_irec *i1, struct xfs_refcount_irec *i2, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2943) 		 xfs_agblock_t agbno), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2944) 	TP_ARGS(mp, agno, i1, i2, agbno))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2945) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2946) /* triple-rcext tracepoint class */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2947) DECLARE_EVENT_CLASS(xfs_refcount_triple_extent_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2948) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2949) 		 struct xfs_refcount_irec *i1, struct xfs_refcount_irec *i2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2950) 		 struct xfs_refcount_irec *i3),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2951) 	TP_ARGS(mp, agno, i1, i2, i3),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2952) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2953) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2954) 		__field(xfs_agnumber_t, agno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2955) 		__field(xfs_agblock_t, i1_startblock)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2956) 		__field(xfs_extlen_t, i1_blockcount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2957) 		__field(xfs_nlink_t, i1_refcount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2958) 		__field(xfs_agblock_t, i2_startblock)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2959) 		__field(xfs_extlen_t, i2_blockcount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2960) 		__field(xfs_nlink_t, i2_refcount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2961) 		__field(xfs_agblock_t, i3_startblock)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2962) 		__field(xfs_extlen_t, i3_blockcount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2963) 		__field(xfs_nlink_t, i3_refcount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2964) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2965) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2966) 		__entry->dev = mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2967) 		__entry->agno = agno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2968) 		__entry->i1_startblock = i1->rc_startblock;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2969) 		__entry->i1_blockcount = i1->rc_blockcount;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2970) 		__entry->i1_refcount = i1->rc_refcount;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2971) 		__entry->i2_startblock = i2->rc_startblock;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2972) 		__entry->i2_blockcount = i2->rc_blockcount;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2973) 		__entry->i2_refcount = i2->rc_refcount;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2974) 		__entry->i3_startblock = i3->rc_startblock;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2975) 		__entry->i3_blockcount = i3->rc_blockcount;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2976) 		__entry->i3_refcount = i3->rc_refcount;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2977) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2978) 	TP_printk("dev %d:%d agno %u agbno %u len %u refcount %u -- "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2979) 		  "agbno %u len %u refcount %u -- "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2980) 		  "agbno %u len %u refcount %u",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2981) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2982) 		  __entry->agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2983) 		  __entry->i1_startblock,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2984) 		  __entry->i1_blockcount,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2985) 		  __entry->i1_refcount,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2986) 		  __entry->i2_startblock,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2987) 		  __entry->i2_blockcount,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2988) 		  __entry->i2_refcount,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2989) 		  __entry->i3_startblock,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2990) 		  __entry->i3_blockcount,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2991) 		  __entry->i3_refcount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2992) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2993) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2994) #define DEFINE_REFCOUNT_TRIPLE_EXTENT_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2995) DEFINE_EVENT(xfs_refcount_triple_extent_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2996) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2997) 		 struct xfs_refcount_irec *i1, struct xfs_refcount_irec *i2, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2998) 		 struct xfs_refcount_irec *i3), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2999) 	TP_ARGS(mp, agno, i1, i2, i3))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3000) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3001) /* refcount btree tracepoints */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3002) DEFINE_BUSY_EVENT(xfs_refcountbt_alloc_block);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3003) DEFINE_BUSY_EVENT(xfs_refcountbt_free_block);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3004) DEFINE_AG_BTREE_LOOKUP_EVENT(xfs_refcount_lookup);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3005) DEFINE_REFCOUNT_EXTENT_EVENT(xfs_refcount_get);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3006) DEFINE_REFCOUNT_EXTENT_EVENT(xfs_refcount_update);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3007) DEFINE_REFCOUNT_EXTENT_EVENT(xfs_refcount_insert);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3008) DEFINE_REFCOUNT_EXTENT_EVENT(xfs_refcount_delete);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3009) DEFINE_AG_ERROR_EVENT(xfs_refcount_insert_error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3010) DEFINE_AG_ERROR_EVENT(xfs_refcount_delete_error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3011) DEFINE_AG_ERROR_EVENT(xfs_refcount_update_error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3012) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3013) /* refcount adjustment tracepoints */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3014) DEFINE_AG_EXTENT_EVENT(xfs_refcount_increase);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3015) DEFINE_AG_EXTENT_EVENT(xfs_refcount_decrease);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3016) DEFINE_AG_EXTENT_EVENT(xfs_refcount_cow_increase);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3017) DEFINE_AG_EXTENT_EVENT(xfs_refcount_cow_decrease);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3018) DEFINE_REFCOUNT_TRIPLE_EXTENT_EVENT(xfs_refcount_merge_center_extents);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3019) DEFINE_REFCOUNT_EXTENT_EVENT(xfs_refcount_modify_extent);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3020) DEFINE_REFCOUNT_EXTENT_EVENT(xfs_refcount_recover_extent);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3021) DEFINE_REFCOUNT_EXTENT_AT_EVENT(xfs_refcount_split_extent);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3022) DEFINE_REFCOUNT_DOUBLE_EXTENT_EVENT(xfs_refcount_merge_left_extent);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3023) DEFINE_REFCOUNT_DOUBLE_EXTENT_EVENT(xfs_refcount_merge_right_extent);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3024) DEFINE_REFCOUNT_DOUBLE_EXTENT_AT_EVENT(xfs_refcount_find_left_extent);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3025) DEFINE_REFCOUNT_DOUBLE_EXTENT_AT_EVENT(xfs_refcount_find_right_extent);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3026) DEFINE_AG_ERROR_EVENT(xfs_refcount_adjust_error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3027) DEFINE_AG_ERROR_EVENT(xfs_refcount_adjust_cow_error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3028) DEFINE_AG_ERROR_EVENT(xfs_refcount_merge_center_extents_error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3029) DEFINE_AG_ERROR_EVENT(xfs_refcount_modify_extent_error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3030) DEFINE_AG_ERROR_EVENT(xfs_refcount_split_extent_error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3031) DEFINE_AG_ERROR_EVENT(xfs_refcount_merge_left_extent_error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3032) DEFINE_AG_ERROR_EVENT(xfs_refcount_merge_right_extent_error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3033) DEFINE_AG_ERROR_EVENT(xfs_refcount_find_left_extent_error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3034) DEFINE_AG_ERROR_EVENT(xfs_refcount_find_right_extent_error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3035) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3036) /* reflink helpers */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3037) DEFINE_AG_EXTENT_EVENT(xfs_refcount_find_shared);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3038) DEFINE_AG_EXTENT_EVENT(xfs_refcount_find_shared_result);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3039) DEFINE_AG_ERROR_EVENT(xfs_refcount_find_shared_error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3040) #define DEFINE_REFCOUNT_DEFERRED_EVENT DEFINE_PHYS_EXTENT_DEFERRED_EVENT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3041) DEFINE_REFCOUNT_DEFERRED_EVENT(xfs_refcount_defer);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3042) DEFINE_REFCOUNT_DEFERRED_EVENT(xfs_refcount_deferred);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3043) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3044) TRACE_EVENT(xfs_refcount_finish_one_leftover,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3045) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3046) 		 int type, xfs_agblock_t agbno, xfs_extlen_t len,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3047) 		 xfs_agblock_t new_agbno, xfs_extlen_t new_len),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3048) 	TP_ARGS(mp, agno, type, agbno, len, new_agbno, new_len),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3049) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3050) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3051) 		__field(xfs_agnumber_t, agno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3052) 		__field(int, type)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3053) 		__field(xfs_agblock_t, agbno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3054) 		__field(xfs_extlen_t, len)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3055) 		__field(xfs_agblock_t, new_agbno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3056) 		__field(xfs_extlen_t, new_len)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3057) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3058) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3059) 		__entry->dev = mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3060) 		__entry->agno = agno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3061) 		__entry->type = type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3062) 		__entry->agbno = agbno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3063) 		__entry->len = len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3064) 		__entry->new_agbno = new_agbno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3065) 		__entry->new_len = new_len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3066) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3067) 	TP_printk("dev %d:%d type %d agno %u agbno %u len %u new_agbno %u new_len %u",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3068) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3069) 		  __entry->type,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3070) 		  __entry->agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3071) 		  __entry->agbno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3072) 		  __entry->len,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3073) 		  __entry->new_agbno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3074) 		  __entry->new_len)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3075) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3076) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3077) /* simple inode-based error/%ip tracepoint class */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3078) DECLARE_EVENT_CLASS(xfs_inode_error_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3079) 	TP_PROTO(struct xfs_inode *ip, int error, unsigned long caller_ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3080) 	TP_ARGS(ip, error, caller_ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3081) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3082) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3083) 		__field(xfs_ino_t, ino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3084) 		__field(int, error)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3085) 		__field(unsigned long, caller_ip)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3086) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3087) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3088) 		__entry->dev = VFS_I(ip)->i_sb->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3089) 		__entry->ino = ip->i_ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3090) 		__entry->error = error;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3091) 		__entry->caller_ip = caller_ip;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3092) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3093) 	TP_printk("dev %d:%d ino %llx error %d caller %pS",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3094) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3095) 		  __entry->ino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3096) 		  __entry->error,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3097) 		  (char *)__entry->caller_ip)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3098) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3099) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3100) #define DEFINE_INODE_ERROR_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3101) DEFINE_EVENT(xfs_inode_error_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3102) 	TP_PROTO(struct xfs_inode *ip, int error, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3103) 		 unsigned long caller_ip), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3104) 	TP_ARGS(ip, error, caller_ip))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3105) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3106) /* reflink tracepoint classes */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3107) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3108) /* two-file io tracepoint class */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3109) DECLARE_EVENT_CLASS(xfs_double_io_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3110) 	TP_PROTO(struct xfs_inode *src, xfs_off_t soffset, xfs_off_t len,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3111) 		 struct xfs_inode *dest, xfs_off_t doffset),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3112) 	TP_ARGS(src, soffset, len, dest, doffset),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3113) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3114) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3115) 		__field(xfs_ino_t, src_ino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3116) 		__field(loff_t, src_isize)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3117) 		__field(loff_t, src_disize)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3118) 		__field(loff_t, src_offset)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3119) 		__field(size_t, len)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3120) 		__field(xfs_ino_t, dest_ino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3121) 		__field(loff_t, dest_isize)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3122) 		__field(loff_t, dest_disize)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3123) 		__field(loff_t, dest_offset)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3124) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3125) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3126) 		__entry->dev = VFS_I(src)->i_sb->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3127) 		__entry->src_ino = src->i_ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3128) 		__entry->src_isize = VFS_I(src)->i_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3129) 		__entry->src_disize = src->i_d.di_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3130) 		__entry->src_offset = soffset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3131) 		__entry->len = len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3132) 		__entry->dest_ino = dest->i_ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3133) 		__entry->dest_isize = VFS_I(dest)->i_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3134) 		__entry->dest_disize = dest->i_d.di_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3135) 		__entry->dest_offset = doffset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3136) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3137) 	TP_printk("dev %d:%d count %zd "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3138) 		  "ino 0x%llx isize 0x%llx disize 0x%llx offset 0x%llx -> "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3139) 		  "ino 0x%llx isize 0x%llx disize 0x%llx offset 0x%llx",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3140) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3141) 		  __entry->len,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3142) 		  __entry->src_ino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3143) 		  __entry->src_isize,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3144) 		  __entry->src_disize,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3145) 		  __entry->src_offset,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3146) 		  __entry->dest_ino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3147) 		  __entry->dest_isize,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3148) 		  __entry->dest_disize,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3149) 		  __entry->dest_offset)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3150) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3151) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3152) #define DEFINE_DOUBLE_IO_EVENT(name)	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3153) DEFINE_EVENT(xfs_double_io_class, name,	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3154) 	TP_PROTO(struct xfs_inode *src, xfs_off_t soffset, xfs_off_t len, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3155) 		 struct xfs_inode *dest, xfs_off_t doffset), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3156) 	TP_ARGS(src, soffset, len, dest, doffset))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3157) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3158) /* inode/irec events */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3159) DECLARE_EVENT_CLASS(xfs_inode_irec_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3160) 	TP_PROTO(struct xfs_inode *ip, struct xfs_bmbt_irec *irec),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3161) 	TP_ARGS(ip, irec),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3162) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3163) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3164) 		__field(xfs_ino_t, ino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3165) 		__field(xfs_fileoff_t, lblk)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3166) 		__field(xfs_extlen_t, len)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3167) 		__field(xfs_fsblock_t, pblk)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3168) 		__field(int, state)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3169) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3170) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3171) 		__entry->dev = VFS_I(ip)->i_sb->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3172) 		__entry->ino = ip->i_ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3173) 		__entry->lblk = irec->br_startoff;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3174) 		__entry->len = irec->br_blockcount;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3175) 		__entry->pblk = irec->br_startblock;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3176) 		__entry->state = irec->br_state;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3177) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3178) 	TP_printk("dev %d:%d ino 0x%llx lblk 0x%llx len 0x%x pblk %llu st %d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3179) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3180) 		  __entry->ino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3181) 		  __entry->lblk,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3182) 		  __entry->len,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3183) 		  __entry->pblk,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3184) 		  __entry->state)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3185) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3186) #define DEFINE_INODE_IREC_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3187) DEFINE_EVENT(xfs_inode_irec_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3188) 	TP_PROTO(struct xfs_inode *ip, struct xfs_bmbt_irec *irec), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3189) 	TP_ARGS(ip, irec))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3190) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3191) /* refcount/reflink tracepoint definitions */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3192) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3193) /* reflink tracepoints */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3194) DEFINE_INODE_EVENT(xfs_reflink_set_inode_flag);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3195) DEFINE_INODE_EVENT(xfs_reflink_unset_inode_flag);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3196) DEFINE_ITRUNC_EVENT(xfs_reflink_update_inode_size);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3197) TRACE_EVENT(xfs_reflink_remap_blocks,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3198) 	TP_PROTO(struct xfs_inode *src, xfs_fileoff_t soffset,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3199) 		 xfs_filblks_t len, struct xfs_inode *dest,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3200) 		 xfs_fileoff_t doffset),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3201) 	TP_ARGS(src, soffset, len, dest, doffset),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3202) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3203) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3204) 		__field(xfs_ino_t, src_ino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3205) 		__field(xfs_fileoff_t, src_lblk)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3206) 		__field(xfs_filblks_t, len)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3207) 		__field(xfs_ino_t, dest_ino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3208) 		__field(xfs_fileoff_t, dest_lblk)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3209) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3210) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3211) 		__entry->dev = VFS_I(src)->i_sb->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3212) 		__entry->src_ino = src->i_ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3213) 		__entry->src_lblk = soffset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3214) 		__entry->len = len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3215) 		__entry->dest_ino = dest->i_ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3216) 		__entry->dest_lblk = doffset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3217) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3218) 	TP_printk("dev %d:%d len 0x%llx "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3219) 		  "ino 0x%llx offset 0x%llx blocks -> "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3220) 		  "ino 0x%llx offset 0x%llx blocks",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3221) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3222) 		  __entry->len,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3223) 		  __entry->src_ino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3224) 		  __entry->src_lblk,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3225) 		  __entry->dest_ino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3226) 		  __entry->dest_lblk)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3227) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3228) DEFINE_DOUBLE_IO_EVENT(xfs_reflink_remap_range);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3229) DEFINE_INODE_ERROR_EVENT(xfs_reflink_remap_range_error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3230) DEFINE_INODE_ERROR_EVENT(xfs_reflink_set_inode_flag_error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3231) DEFINE_INODE_ERROR_EVENT(xfs_reflink_update_inode_size_error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3232) DEFINE_INODE_ERROR_EVENT(xfs_reflink_remap_blocks_error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3233) DEFINE_INODE_ERROR_EVENT(xfs_reflink_remap_extent_error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3234) DEFINE_INODE_IREC_EVENT(xfs_reflink_remap_extent_src);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3235) DEFINE_INODE_IREC_EVENT(xfs_reflink_remap_extent_dest);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3236) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3237) /* dedupe tracepoints */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3238) DEFINE_DOUBLE_IO_EVENT(xfs_reflink_compare_extents);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3239) DEFINE_INODE_ERROR_EVENT(xfs_reflink_compare_extents_error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3240) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3241) /* ioctl tracepoints */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3242) TRACE_EVENT(xfs_ioctl_clone,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3243) 	TP_PROTO(struct inode *src, struct inode *dest),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3244) 	TP_ARGS(src, dest),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3245) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3246) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3247) 		__field(unsigned long, src_ino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3248) 		__field(loff_t, src_isize)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3249) 		__field(unsigned long, dest_ino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3250) 		__field(loff_t, dest_isize)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3251) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3252) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3253) 		__entry->dev = src->i_sb->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3254) 		__entry->src_ino = src->i_ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3255) 		__entry->src_isize = i_size_read(src);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3256) 		__entry->dest_ino = dest->i_ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3257) 		__entry->dest_isize = i_size_read(dest);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3258) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3259) 	TP_printk("dev %d:%d "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3260) 		  "ino 0x%lx isize 0x%llx -> "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3261) 		  "ino 0x%lx isize 0x%llx",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3262) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3263) 		  __entry->src_ino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3264) 		  __entry->src_isize,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3265) 		  __entry->dest_ino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3266) 		  __entry->dest_isize)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3267) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3268) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3269) /* unshare tracepoints */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3270) DEFINE_SIMPLE_IO_EVENT(xfs_reflink_unshare);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3271) DEFINE_INODE_ERROR_EVENT(xfs_reflink_unshare_error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3272) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3273) /* copy on write */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3274) DEFINE_INODE_IREC_EVENT(xfs_reflink_trim_around_shared);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3275) DEFINE_INODE_IREC_EVENT(xfs_reflink_cow_found);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3276) DEFINE_INODE_IREC_EVENT(xfs_reflink_cow_enospc);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3277) DEFINE_INODE_IREC_EVENT(xfs_reflink_convert_cow);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3278) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3279) DEFINE_SIMPLE_IO_EVENT(xfs_reflink_bounce_dio_write);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3280) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3281) DEFINE_SIMPLE_IO_EVENT(xfs_reflink_cancel_cow_range);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3282) DEFINE_SIMPLE_IO_EVENT(xfs_reflink_end_cow);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3283) DEFINE_INODE_IREC_EVENT(xfs_reflink_cow_remap);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3284) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3285) DEFINE_INODE_ERROR_EVENT(xfs_reflink_cancel_cow_range_error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3286) DEFINE_INODE_ERROR_EVENT(xfs_reflink_end_cow_error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3287) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3288) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3289) DEFINE_INODE_IREC_EVENT(xfs_reflink_cancel_cow);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3290) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3291) /* rmap swapext tracepoints */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3292) DEFINE_INODE_IREC_EVENT(xfs_swap_extent_rmap_remap);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3293) DEFINE_INODE_IREC_EVENT(xfs_swap_extent_rmap_remap_piece);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3294) DEFINE_INODE_ERROR_EVENT(xfs_swap_extent_rmap_error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3295) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3296) /* fsmap traces */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3297) DECLARE_EVENT_CLASS(xfs_fsmap_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3298) 	TP_PROTO(struct xfs_mount *mp, u32 keydev, xfs_agnumber_t agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3299) 		 struct xfs_rmap_irec *rmap),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3300) 	TP_ARGS(mp, keydev, agno, rmap),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3301) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3302) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3303) 		__field(dev_t, keydev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3304) 		__field(xfs_agnumber_t, agno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3305) 		__field(xfs_fsblock_t, bno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3306) 		__field(xfs_filblks_t, len)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3307) 		__field(uint64_t, owner)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3308) 		__field(uint64_t, offset)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3309) 		__field(unsigned int, flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3310) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3311) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3312) 		__entry->dev = mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3313) 		__entry->keydev = new_decode_dev(keydev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3314) 		__entry->agno = agno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3315) 		__entry->bno = rmap->rm_startblock;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3316) 		__entry->len = rmap->rm_blockcount;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3317) 		__entry->owner = rmap->rm_owner;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3318) 		__entry->offset = rmap->rm_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3319) 		__entry->flags = rmap->rm_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3320) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3321) 	TP_printk("dev %d:%d keydev %d:%d agno %u bno %llu len %llu owner %lld offset %llu flags 0x%x",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3322) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3323) 		  MAJOR(__entry->keydev), MINOR(__entry->keydev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3324) 		  __entry->agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3325) 		  __entry->bno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3326) 		  __entry->len,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3327) 		  __entry->owner,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3328) 		  __entry->offset,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3329) 		  __entry->flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3330) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3331) #define DEFINE_FSMAP_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3332) DEFINE_EVENT(xfs_fsmap_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3333) 	TP_PROTO(struct xfs_mount *mp, u32 keydev, xfs_agnumber_t agno, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3334) 		 struct xfs_rmap_irec *rmap), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3335) 	TP_ARGS(mp, keydev, agno, rmap))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3336) DEFINE_FSMAP_EVENT(xfs_fsmap_low_key);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3337) DEFINE_FSMAP_EVENT(xfs_fsmap_high_key);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3338) DEFINE_FSMAP_EVENT(xfs_fsmap_mapping);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3339) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3340) DECLARE_EVENT_CLASS(xfs_getfsmap_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3341) 	TP_PROTO(struct xfs_mount *mp, struct xfs_fsmap *fsmap),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3342) 	TP_ARGS(mp, fsmap),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3343) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3344) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3345) 		__field(dev_t, keydev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3346) 		__field(xfs_daddr_t, block)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3347) 		__field(xfs_daddr_t, len)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3348) 		__field(uint64_t, owner)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3349) 		__field(uint64_t, offset)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3350) 		__field(uint64_t, flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3351) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3352) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3353) 		__entry->dev = mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3354) 		__entry->keydev = new_decode_dev(fsmap->fmr_device);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3355) 		__entry->block = fsmap->fmr_physical;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3356) 		__entry->len = fsmap->fmr_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3357) 		__entry->owner = fsmap->fmr_owner;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3358) 		__entry->offset = fsmap->fmr_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3359) 		__entry->flags = fsmap->fmr_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3360) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3361) 	TP_printk("dev %d:%d keydev %d:%d block %llu len %llu owner %lld offset %llu flags 0x%llx",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3362) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3363) 		  MAJOR(__entry->keydev), MINOR(__entry->keydev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3364) 		  __entry->block,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3365) 		  __entry->len,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3366) 		  __entry->owner,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3367) 		  __entry->offset,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3368) 		  __entry->flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3369) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3370) #define DEFINE_GETFSMAP_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3371) DEFINE_EVENT(xfs_getfsmap_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3372) 	TP_PROTO(struct xfs_mount *mp, struct xfs_fsmap *fsmap), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3373) 	TP_ARGS(mp, fsmap))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3374) DEFINE_GETFSMAP_EVENT(xfs_getfsmap_low_key);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3375) DEFINE_GETFSMAP_EVENT(xfs_getfsmap_high_key);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3376) DEFINE_GETFSMAP_EVENT(xfs_getfsmap_mapping);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3377) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3378) TRACE_EVENT(xfs_trans_resv_calc,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3379) 	TP_PROTO(struct xfs_mount *mp, unsigned int type,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3380) 		 struct xfs_trans_res *res),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3381) 	TP_ARGS(mp, type, res),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3382) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3383) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3384) 		__field(int, type)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3385) 		__field(uint, logres)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3386) 		__field(int, logcount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3387) 		__field(int, logflags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3388) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3389) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3390) 		__entry->dev = mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3391) 		__entry->type = type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3392) 		__entry->logres = res->tr_logres;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3393) 		__entry->logcount = res->tr_logcount;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3394) 		__entry->logflags = res->tr_logflags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3395) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3396) 	TP_printk("dev %d:%d type %d logres %u logcount %d flags 0x%x",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3397) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3398) 		  __entry->type,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3399) 		  __entry->logres,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3400) 		  __entry->logcount,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3401) 		  __entry->logflags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3402) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3403) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3404) DECLARE_EVENT_CLASS(xfs_trans_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3405) 	TP_PROTO(struct xfs_trans *tp, unsigned long caller_ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3406) 	TP_ARGS(tp, caller_ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3407) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3408) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3409) 		__field(uint32_t, tid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3410) 		__field(uint32_t, flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3411) 		__field(unsigned long, caller_ip)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3412) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3413) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3414) 		__entry->dev = tp->t_mountp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3415) 		__entry->tid = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3416) 		if (tp->t_ticket)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3417) 			__entry->tid = tp->t_ticket->t_tid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3418) 		__entry->flags = tp->t_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3419) 		__entry->caller_ip = caller_ip;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3420) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3421) 	TP_printk("dev %d:%d trans %x flags 0x%x caller %pS",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3422) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3423) 		  __entry->tid,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3424) 		  __entry->flags,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3425) 		  (char *)__entry->caller_ip)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3426) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3427) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3428) #define DEFINE_TRANS_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3429) DEFINE_EVENT(xfs_trans_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3430) 	TP_PROTO(struct xfs_trans *tp, unsigned long caller_ip), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3431) 	TP_ARGS(tp, caller_ip))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3432) DEFINE_TRANS_EVENT(xfs_trans_alloc);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3433) DEFINE_TRANS_EVENT(xfs_trans_cancel);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3434) DEFINE_TRANS_EVENT(xfs_trans_commit);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3435) DEFINE_TRANS_EVENT(xfs_trans_dup);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3436) DEFINE_TRANS_EVENT(xfs_trans_free);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3437) DEFINE_TRANS_EVENT(xfs_trans_roll);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3438) DEFINE_TRANS_EVENT(xfs_trans_add_item);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3439) DEFINE_TRANS_EVENT(xfs_trans_commit_items);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3440) DEFINE_TRANS_EVENT(xfs_trans_free_items);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3441) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3442) TRACE_EVENT(xfs_iunlink_update_bucket,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3443) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, unsigned int bucket,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3444) 		 xfs_agino_t old_ptr, xfs_agino_t new_ptr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3445) 	TP_ARGS(mp, agno, bucket, old_ptr, new_ptr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3446) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3447) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3448) 		__field(xfs_agnumber_t, agno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3449) 		__field(unsigned int, bucket)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3450) 		__field(xfs_agino_t, old_ptr)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3451) 		__field(xfs_agino_t, new_ptr)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3452) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3453) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3454) 		__entry->dev = mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3455) 		__entry->agno = agno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3456) 		__entry->bucket = bucket;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3457) 		__entry->old_ptr = old_ptr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3458) 		__entry->new_ptr = new_ptr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3459) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3460) 	TP_printk("dev %d:%d agno %u bucket %u old 0x%x new 0x%x",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3461) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3462) 		  __entry->agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3463) 		  __entry->bucket,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3464) 		  __entry->old_ptr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3465) 		  __entry->new_ptr)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3466) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3467) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3468) TRACE_EVENT(xfs_iunlink_update_dinode,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3469) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, xfs_agino_t agino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3470) 		 xfs_agino_t old_ptr, xfs_agino_t new_ptr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3471) 	TP_ARGS(mp, agno, agino, old_ptr, new_ptr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3472) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3473) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3474) 		__field(xfs_agnumber_t, agno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3475) 		__field(xfs_agino_t, agino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3476) 		__field(xfs_agino_t, old_ptr)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3477) 		__field(xfs_agino_t, new_ptr)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3478) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3479) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3480) 		__entry->dev = mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3481) 		__entry->agno = agno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3482) 		__entry->agino = agino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3483) 		__entry->old_ptr = old_ptr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3484) 		__entry->new_ptr = new_ptr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3485) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3486) 	TP_printk("dev %d:%d agno %u agino 0x%x old 0x%x new 0x%x",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3487) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3488) 		  __entry->agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3489) 		  __entry->agino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3490) 		  __entry->old_ptr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3491) 		  __entry->new_ptr)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3492) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3493) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3494) DECLARE_EVENT_CLASS(xfs_ag_inode_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3495) 	TP_PROTO(struct xfs_inode *ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3496) 	TP_ARGS(ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3497) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3498) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3499) 		__field(xfs_agnumber_t, agno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3500) 		__field(xfs_agino_t, agino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3501) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3502) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3503) 		__entry->dev = VFS_I(ip)->i_sb->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3504) 		__entry->agno = XFS_INO_TO_AGNO(ip->i_mount, ip->i_ino);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3505) 		__entry->agino = XFS_INO_TO_AGINO(ip->i_mount, ip->i_ino);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3506) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3507) 	TP_printk("dev %d:%d agno %u agino %u",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3508) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3509) 		  __entry->agno, __entry->agino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3510) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3511) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3512) #define DEFINE_AGINODE_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3513) DEFINE_EVENT(xfs_ag_inode_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3514) 	TP_PROTO(struct xfs_inode *ip), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3515) 	TP_ARGS(ip))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3516) DEFINE_AGINODE_EVENT(xfs_iunlink);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3517) DEFINE_AGINODE_EVENT(xfs_iunlink_remove);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3518) DEFINE_AG_EVENT(xfs_iunlink_map_prev_fallback);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3519) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3520) DECLARE_EVENT_CLASS(xfs_fs_corrupt_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3521) 	TP_PROTO(struct xfs_mount *mp, unsigned int flags),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3522) 	TP_ARGS(mp, flags),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3523) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3524) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3525) 		__field(unsigned int, flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3526) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3527) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3528) 		__entry->dev = mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3529) 		__entry->flags = flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3530) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3531) 	TP_printk("dev %d:%d flags 0x%x",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3532) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3533) 		  __entry->flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3534) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3535) #define DEFINE_FS_CORRUPT_EVENT(name)	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3536) DEFINE_EVENT(xfs_fs_corrupt_class, name,	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3537) 	TP_PROTO(struct xfs_mount *mp, unsigned int flags), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3538) 	TP_ARGS(mp, flags))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3539) DEFINE_FS_CORRUPT_EVENT(xfs_fs_mark_sick);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3540) DEFINE_FS_CORRUPT_EVENT(xfs_fs_mark_healthy);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3541) DEFINE_FS_CORRUPT_EVENT(xfs_fs_unfixed_corruption);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3542) DEFINE_FS_CORRUPT_EVENT(xfs_rt_mark_sick);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3543) DEFINE_FS_CORRUPT_EVENT(xfs_rt_mark_healthy);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3544) DEFINE_FS_CORRUPT_EVENT(xfs_rt_unfixed_corruption);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3545) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3546) DECLARE_EVENT_CLASS(xfs_ag_corrupt_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3547) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, unsigned int flags),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3548) 	TP_ARGS(mp, agno, flags),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3549) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3550) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3551) 		__field(xfs_agnumber_t, agno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3552) 		__field(unsigned int, flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3553) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3554) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3555) 		__entry->dev = mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3556) 		__entry->agno = agno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3557) 		__entry->flags = flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3558) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3559) 	TP_printk("dev %d:%d agno %u flags 0x%x",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3560) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3561) 		  __entry->agno, __entry->flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3562) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3563) #define DEFINE_AG_CORRUPT_EVENT(name)	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3564) DEFINE_EVENT(xfs_ag_corrupt_class, name,	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3565) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3566) 		 unsigned int flags), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3567) 	TP_ARGS(mp, agno, flags))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3568) DEFINE_AG_CORRUPT_EVENT(xfs_ag_mark_sick);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3569) DEFINE_AG_CORRUPT_EVENT(xfs_ag_mark_healthy);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3570) DEFINE_AG_CORRUPT_EVENT(xfs_ag_unfixed_corruption);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3571) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3572) DECLARE_EVENT_CLASS(xfs_inode_corrupt_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3573) 	TP_PROTO(struct xfs_inode *ip, unsigned int flags),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3574) 	TP_ARGS(ip, flags),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3575) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3576) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3577) 		__field(xfs_ino_t, ino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3578) 		__field(unsigned int, flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3579) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3580) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3581) 		__entry->dev = ip->i_mount->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3582) 		__entry->ino = ip->i_ino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3583) 		__entry->flags = flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3584) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3585) 	TP_printk("dev %d:%d ino 0x%llx flags 0x%x",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3586) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3587) 		  __entry->ino, __entry->flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3588) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3589) #define DEFINE_INODE_CORRUPT_EVENT(name)	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3590) DEFINE_EVENT(xfs_inode_corrupt_class, name,	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3591) 	TP_PROTO(struct xfs_inode *ip, unsigned int flags), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3592) 	TP_ARGS(ip, flags))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3593) DEFINE_INODE_CORRUPT_EVENT(xfs_inode_mark_sick);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3594) DEFINE_INODE_CORRUPT_EVENT(xfs_inode_mark_healthy);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3595) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3596) TRACE_EVENT(xfs_iwalk_ag,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3597) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3598) 		 xfs_agino_t startino),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3599) 	TP_ARGS(mp, agno, startino),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3600) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3601) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3602) 		__field(xfs_agnumber_t, agno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3603) 		__field(xfs_agino_t, startino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3604) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3605) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3606) 		__entry->dev = mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3607) 		__entry->agno = agno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3608) 		__entry->startino = startino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3609) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3610) 	TP_printk("dev %d:%d agno %d startino %u",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3611) 		  MAJOR(__entry->dev), MINOR(__entry->dev), __entry->agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3612) 		  __entry->startino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3613) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3614) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3615) TRACE_EVENT(xfs_iwalk_ag_rec,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3616) 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3617) 		 struct xfs_inobt_rec_incore *irec),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3618) 	TP_ARGS(mp, agno, irec),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3619) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3620) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3621) 		__field(xfs_agnumber_t, agno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3622) 		__field(xfs_agino_t, startino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3623) 		__field(uint64_t, freemask)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3624) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3625) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3626) 		__entry->dev = mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3627) 		__entry->agno = agno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3628) 		__entry->startino = irec->ir_startino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3629) 		__entry->freemask = irec->ir_free;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3630) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3631) 	TP_printk("dev %d:%d agno %d startino %u freemask 0x%llx",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3632) 		  MAJOR(__entry->dev), MINOR(__entry->dev), __entry->agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3633) 		  __entry->startino, __entry->freemask)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3634) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3635) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3636) TRACE_EVENT(xfs_pwork_init,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3637) 	TP_PROTO(struct xfs_mount *mp, unsigned int nr_threads, pid_t pid),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3638) 	TP_ARGS(mp, nr_threads, pid),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3639) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3640) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3641) 		__field(unsigned int, nr_threads)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3642) 		__field(pid_t, pid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3643) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3644) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3645) 		__entry->dev = mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3646) 		__entry->nr_threads = nr_threads;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3647) 		__entry->pid = pid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3648) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3649) 	TP_printk("dev %d:%d nr_threads %u pid %u",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3650) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3651) 		  __entry->nr_threads, __entry->pid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3652) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3653) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3654) DECLARE_EVENT_CLASS(xfs_kmem_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3655) 	TP_PROTO(ssize_t size, int flags, unsigned long caller_ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3656) 	TP_ARGS(size, flags, caller_ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3657) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3658) 		__field(ssize_t, size)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3659) 		__field(int, flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3660) 		__field(unsigned long, caller_ip)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3661) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3662) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3663) 		__entry->size = size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3664) 		__entry->flags = flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3665) 		__entry->caller_ip = caller_ip;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3666) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3667) 	TP_printk("size %zd flags 0x%x caller %pS",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3668) 		  __entry->size,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3669) 		  __entry->flags,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3670) 		  (char *)__entry->caller_ip)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3671) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3672) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3673) #define DEFINE_KMEM_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3674) DEFINE_EVENT(xfs_kmem_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3675) 	TP_PROTO(ssize_t size, int flags, unsigned long caller_ip), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3676) 	TP_ARGS(size, flags, caller_ip))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3677) DEFINE_KMEM_EVENT(kmem_alloc);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3678) DEFINE_KMEM_EVENT(kmem_alloc_io);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3679) DEFINE_KMEM_EVENT(kmem_alloc_large);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3680) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3681) TRACE_EVENT(xfs_check_new_dalign,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3682) 	TP_PROTO(struct xfs_mount *mp, int new_dalign, xfs_ino_t calc_rootino),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3683) 	TP_ARGS(mp, new_dalign, calc_rootino),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3684) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3685) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3686) 		__field(int, new_dalign)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3687) 		__field(xfs_ino_t, sb_rootino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3688) 		__field(xfs_ino_t, calc_rootino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3689) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3690) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3691) 		__entry->dev = mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3692) 		__entry->new_dalign = new_dalign;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3693) 		__entry->sb_rootino = mp->m_sb.sb_rootino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3694) 		__entry->calc_rootino = calc_rootino;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3695) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3696) 	TP_printk("dev %d:%d new_dalign %d sb_rootino %llu calc_rootino %llu",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3697) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3698) 		  __entry->new_dalign, __entry->sb_rootino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3699) 		  __entry->calc_rootino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3700) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3701) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3702) TRACE_EVENT(xfs_btree_commit_afakeroot,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3703) 	TP_PROTO(struct xfs_btree_cur *cur),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3704) 	TP_ARGS(cur),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3705) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3706) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3707) 		__field(xfs_btnum_t, btnum)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3708) 		__field(xfs_agnumber_t, agno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3709) 		__field(xfs_agblock_t, agbno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3710) 		__field(unsigned int, levels)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3711) 		__field(unsigned int, blocks)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3712) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3713) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3714) 		__entry->dev = cur->bc_mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3715) 		__entry->btnum = cur->bc_btnum;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3716) 		__entry->agno = cur->bc_ag.agno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3717) 		__entry->agbno = cur->bc_ag.afake->af_root;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3718) 		__entry->levels = cur->bc_ag.afake->af_levels;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3719) 		__entry->blocks = cur->bc_ag.afake->af_blocks;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3720) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3721) 	TP_printk("dev %d:%d btree %s ag %u levels %u blocks %u root %u",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3722) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3723) 		  __print_symbolic(__entry->btnum, XFS_BTNUM_STRINGS),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3724) 		  __entry->agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3725) 		  __entry->levels,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3726) 		  __entry->blocks,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3727) 		  __entry->agbno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3728) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3729) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3730) TRACE_EVENT(xfs_btree_commit_ifakeroot,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3731) 	TP_PROTO(struct xfs_btree_cur *cur),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3732) 	TP_ARGS(cur),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3733) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3734) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3735) 		__field(xfs_btnum_t, btnum)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3736) 		__field(xfs_agnumber_t, agno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3737) 		__field(xfs_agino_t, agino)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3738) 		__field(unsigned int, levels)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3739) 		__field(unsigned int, blocks)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3740) 		__field(int, whichfork)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3741) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3742) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3743) 		__entry->dev = cur->bc_mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3744) 		__entry->btnum = cur->bc_btnum;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3745) 		__entry->agno = XFS_INO_TO_AGNO(cur->bc_mp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3746) 					cur->bc_ino.ip->i_ino);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3747) 		__entry->agino = XFS_INO_TO_AGINO(cur->bc_mp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3748) 					cur->bc_ino.ip->i_ino);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3749) 		__entry->levels = cur->bc_ino.ifake->if_levels;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3750) 		__entry->blocks = cur->bc_ino.ifake->if_blocks;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3751) 		__entry->whichfork = cur->bc_ino.whichfork;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3752) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3753) 	TP_printk("dev %d:%d btree %s ag %u agino %u whichfork %s levels %u blocks %u",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3754) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3755) 		  __print_symbolic(__entry->btnum, XFS_BTNUM_STRINGS),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3756) 		  __entry->agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3757) 		  __entry->agino,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3758) 		  __entry->whichfork == XFS_ATTR_FORK ? "attr" : "data",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3759) 		  __entry->levels,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3760) 		  __entry->blocks)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3761) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3762) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3763) TRACE_EVENT(xfs_btree_bload_level_geometry,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3764) 	TP_PROTO(struct xfs_btree_cur *cur, unsigned int level,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3765) 		 uint64_t nr_this_level, unsigned int nr_per_block,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3766) 		 unsigned int desired_npb, uint64_t blocks,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3767) 		 uint64_t blocks_with_extra),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3768) 	TP_ARGS(cur, level, nr_this_level, nr_per_block, desired_npb, blocks,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3769) 		blocks_with_extra),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3770) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3771) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3772) 		__field(xfs_btnum_t, btnum)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3773) 		__field(unsigned int, level)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3774) 		__field(unsigned int, nlevels)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3775) 		__field(uint64_t, nr_this_level)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3776) 		__field(unsigned int, nr_per_block)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3777) 		__field(unsigned int, desired_npb)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3778) 		__field(unsigned long long, blocks)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3779) 		__field(unsigned long long, blocks_with_extra)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3780) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3781) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3782) 		__entry->dev = cur->bc_mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3783) 		__entry->btnum = cur->bc_btnum;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3784) 		__entry->level = level;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3785) 		__entry->nlevels = cur->bc_nlevels;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3786) 		__entry->nr_this_level = nr_this_level;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3787) 		__entry->nr_per_block = nr_per_block;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3788) 		__entry->desired_npb = desired_npb;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3789) 		__entry->blocks = blocks;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3790) 		__entry->blocks_with_extra = blocks_with_extra;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3791) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3792) 	TP_printk("dev %d:%d btree %s level %u/%u nr_this_level %llu nr_per_block %u desired_npb %u blocks %llu blocks_with_extra %llu",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3793) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3794) 		  __print_symbolic(__entry->btnum, XFS_BTNUM_STRINGS),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3795) 		  __entry->level,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3796) 		  __entry->nlevels,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3797) 		  __entry->nr_this_level,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3798) 		  __entry->nr_per_block,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3799) 		  __entry->desired_npb,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3800) 		  __entry->blocks,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3801) 		  __entry->blocks_with_extra)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3802) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3803) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3804) TRACE_EVENT(xfs_btree_bload_block,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3805) 	TP_PROTO(struct xfs_btree_cur *cur, unsigned int level,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3806) 		 uint64_t block_idx, uint64_t nr_blocks,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3807) 		 union xfs_btree_ptr *ptr, unsigned int nr_records),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3808) 	TP_ARGS(cur, level, block_idx, nr_blocks, ptr, nr_records),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3809) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3810) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3811) 		__field(xfs_btnum_t, btnum)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3812) 		__field(unsigned int, level)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3813) 		__field(unsigned long long, block_idx)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3814) 		__field(unsigned long long, nr_blocks)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3815) 		__field(xfs_agnumber_t, agno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3816) 		__field(xfs_agblock_t, agbno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3817) 		__field(unsigned int, nr_records)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3818) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3819) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3820) 		__entry->dev = cur->bc_mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3821) 		__entry->btnum = cur->bc_btnum;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3822) 		__entry->level = level;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3823) 		__entry->block_idx = block_idx;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3824) 		__entry->nr_blocks = nr_blocks;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3825) 		if (cur->bc_flags & XFS_BTREE_LONG_PTRS) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3826) 			xfs_fsblock_t	fsb = be64_to_cpu(ptr->l);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3827) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3828) 			__entry->agno = XFS_FSB_TO_AGNO(cur->bc_mp, fsb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3829) 			__entry->agbno = XFS_FSB_TO_AGBNO(cur->bc_mp, fsb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3830) 		} else {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3831) 			__entry->agno = cur->bc_ag.agno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3832) 			__entry->agbno = be32_to_cpu(ptr->s);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3833) 		}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3834) 		__entry->nr_records = nr_records;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3835) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3836) 	TP_printk("dev %d:%d btree %s level %u block %llu/%llu fsb (%u/%u) recs %u",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3837) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3838) 		  __print_symbolic(__entry->btnum, XFS_BTNUM_STRINGS),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3839) 		  __entry->level,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3840) 		  __entry->block_idx,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3841) 		  __entry->nr_blocks,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3842) 		  __entry->agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3843) 		  __entry->agbno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3844) 		  __entry->nr_records)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3845) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3846) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3847) DECLARE_EVENT_CLASS(xfs_timestamp_range_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3848) 	TP_PROTO(struct xfs_mount *mp, time64_t min, time64_t max),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3849) 	TP_ARGS(mp, min, max),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3850) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3851) 		__field(dev_t, dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3852) 		__field(long long, min)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3853) 		__field(long long, max)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3854) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3855) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3856) 		__entry->dev = mp->m_super->s_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3857) 		__entry->min = min;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3858) 		__entry->max = max;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3859) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3860) 	TP_printk("dev %d:%d min %lld max %lld",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3861) 		  MAJOR(__entry->dev), MINOR(__entry->dev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3862) 		  __entry->min,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3863) 		  __entry->max)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3864) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3865) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3866) #define DEFINE_TIMESTAMP_RANGE_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3867) DEFINE_EVENT(xfs_timestamp_range_class, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3868) 	TP_PROTO(struct xfs_mount *mp, long long min, long long max), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3869) 	TP_ARGS(mp, min, max))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3870) DEFINE_TIMESTAMP_RANGE_EVENT(xfs_inode_timestamp_range);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3871) DEFINE_TIMESTAMP_RANGE_EVENT(xfs_quota_expiry_range);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3872) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3873) #endif /* _TRACE_XFS_H */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3874) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3875) #undef TRACE_INCLUDE_PATH
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3876) #define TRACE_INCLUDE_PATH .
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3877) #define TRACE_INCLUDE_FILE xfs_trace
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3878) #include <trace/define_trace.h>