LCOV - code coverage report
Current view: top level - fs/xfs/scrub - trace.h (source / functions) Hit Total Coverage
Test: fstests of 6.5.0-rc3-djwx @ Mon Jul 31 20:08:22 PDT 2023 Lines: 26 53 49.1 %
Date: 2023-07-31 20:08:22 Functions: 26 237 11.0 %

          Line data    Source code
       1             : // SPDX-License-Identifier: GPL-2.0-or-later
       2             : /*
       3             :  * Copyright (C) 2017-2023 Oracle.  All Rights Reserved.
       4             :  * Author: Darrick J. Wong <djwong@kernel.org>
       5             :  *
       6             :  * NOTE: none of these tracepoints shall be considered a stable kernel ABI
       7             :  * as they can change at any time.  See xfs_trace.h for documentation of
       8             :  * specific units found in tracepoint output.
       9             :  */
      10             : #undef TRACE_SYSTEM
      11             : #define TRACE_SYSTEM xfs_scrub
      12             : 
      13             : #if !defined(_TRACE_XFS_SCRUB_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
      14             : #define _TRACE_XFS_SCRUB_TRACE_H
      15             : 
      16             : #include <linux/tracepoint.h>
      17             : #include "xfs_bit.h"
      18             : 
      19             : /*
      20             :  * ftrace's __print_symbolic requires that all enum values be wrapped in the
      21             :  * TRACE_DEFINE_ENUM macro so that the enum value can be encoded in the ftrace
      22             :  * ring buffer.  Somehow this was only worth mentioning in the ftrace sample
      23             :  * code.
      24             :  */
      25             : TRACE_DEFINE_ENUM(XFS_BTNUM_BNOi);
      26             : TRACE_DEFINE_ENUM(XFS_BTNUM_CNTi);
      27             : TRACE_DEFINE_ENUM(XFS_BTNUM_BMAPi);
      28             : TRACE_DEFINE_ENUM(XFS_BTNUM_INOi);
      29             : TRACE_DEFINE_ENUM(XFS_BTNUM_FINOi);
      30             : TRACE_DEFINE_ENUM(XFS_BTNUM_RMAPi);
      31             : TRACE_DEFINE_ENUM(XFS_BTNUM_REFCi);
      32             : 
      33             : TRACE_DEFINE_ENUM(XFS_REFC_DOMAIN_SHARED);
      34             : TRACE_DEFINE_ENUM(XFS_REFC_DOMAIN_COW);
      35             : 
      36             : TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_PROBE);
      37             : TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_SB);
      38             : TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_AGF);
      39             : TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_AGFL);
      40             : TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_AGI);
      41             : TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_BNOBT);
      42             : TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_CNTBT);
      43             : TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_INOBT);
      44             : TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_FINOBT);
      45             : TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_RMAPBT);
      46             : TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_REFCNTBT);
      47             : TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_INODE);
      48             : TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_BMBTD);
      49             : TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_BMBTA);
      50             : TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_BMBTC);
      51             : TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_DIR);
      52             : TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_XATTR);
      53             : TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_SYMLINK);
      54             : TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_PARENT);
      55             : TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_RTBITMAP);
      56             : TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_RTSUM);
      57             : TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_UQUOTA);
      58             : TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_GQUOTA);
      59             : TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_PQUOTA);
      60             : TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_FSCOUNTERS);
      61             : 
      62             : #define XFS_SCRUB_TYPE_STRINGS \
      63             :         { XFS_SCRUB_TYPE_PROBE,         "probe" }, \
      64             :         { XFS_SCRUB_TYPE_SB,            "sb" }, \
      65             :         { XFS_SCRUB_TYPE_AGF,           "agf" }, \
      66             :         { XFS_SCRUB_TYPE_AGFL,          "agfl" }, \
      67             :         { XFS_SCRUB_TYPE_AGI,           "agi" }, \
      68             :         { XFS_SCRUB_TYPE_BNOBT,         "bnobt" }, \
      69             :         { XFS_SCRUB_TYPE_CNTBT,         "cntbt" }, \
      70             :         { XFS_SCRUB_TYPE_INOBT,         "inobt" }, \
      71             :         { XFS_SCRUB_TYPE_FINOBT,        "finobt" }, \
      72             :         { XFS_SCRUB_TYPE_RMAPBT,        "rmapbt" }, \
      73             :         { XFS_SCRUB_TYPE_REFCNTBT,      "refcountbt" }, \
      74             :         { XFS_SCRUB_TYPE_INODE,         "inode" }, \
      75             :         { XFS_SCRUB_TYPE_BMBTD,         "bmapbtd" }, \
      76             :         { XFS_SCRUB_TYPE_BMBTA,         "bmapbta" }, \
      77             :         { XFS_SCRUB_TYPE_BMBTC,         "bmapbtc" }, \
      78             :         { XFS_SCRUB_TYPE_DIR,           "directory" }, \
      79             :         { XFS_SCRUB_TYPE_XATTR,         "xattr" }, \
      80             :         { XFS_SCRUB_TYPE_SYMLINK,       "symlink" }, \
      81             :         { XFS_SCRUB_TYPE_PARENT,        "parent" }, \
      82             :         { XFS_SCRUB_TYPE_RTBITMAP,      "rtbitmap" }, \
      83             :         { XFS_SCRUB_TYPE_RTSUM,         "rtsummary" }, \
      84             :         { XFS_SCRUB_TYPE_UQUOTA,        "usrquota" }, \
      85             :         { XFS_SCRUB_TYPE_GQUOTA,        "grpquota" }, \
      86             :         { XFS_SCRUB_TYPE_PQUOTA,        "prjquota" }, \
      87             :         { XFS_SCRUB_TYPE_FSCOUNTERS,    "fscounters" }
      88             : 
      89             : #define XFS_SCRUB_FLAG_STRINGS \
      90             :         { XFS_SCRUB_IFLAG_REPAIR,               "repair" }, \
      91             :         { XFS_SCRUB_OFLAG_CORRUPT,              "corrupt" }, \
      92             :         { XFS_SCRUB_OFLAG_PREEN,                "preen" }, \
      93             :         { XFS_SCRUB_OFLAG_XFAIL,                "xfail" }, \
      94             :         { XFS_SCRUB_OFLAG_XCORRUPT,             "xcorrupt" }, \
      95             :         { XFS_SCRUB_OFLAG_INCOMPLETE,           "incomplete" }, \
      96             :         { XFS_SCRUB_OFLAG_WARNING,              "warning" }, \
      97             :         { XFS_SCRUB_OFLAG_NO_REPAIR_NEEDED,     "norepair" }
      98             : 
      99             : #define XFS_SCRUB_STATE_STRINGS \
     100             :         { XCHK_TRY_HARDER,                      "try_harder" }, \
     101             :         { XCHK_HAVE_FREEZE_PROT,                "nofreeze" }, \
     102             :         { XCHK_FSGATES_DRAIN,                   "fsgates_drain" }, \
     103             :         { XCHK_NEED_DRAIN,                      "need_drain" }, \
     104             :         { XREP_ALREADY_FIXED,                   "already_fixed" }
     105             : 
     106           0 : DECLARE_EVENT_CLASS(xchk_class,
     107             :         TP_PROTO(struct xfs_inode *ip, struct xfs_scrub_metadata *sm,
     108             :                  int error),
     109             :         TP_ARGS(ip, sm, error),
     110             :         TP_STRUCT__entry(
     111             :                 __field(dev_t, dev)
     112             :                 __field(xfs_ino_t, ino)
     113             :                 __field(unsigned int, type)
     114             :                 __field(xfs_agnumber_t, agno)
     115             :                 __field(xfs_ino_t, inum)
     116             :                 __field(unsigned int, gen)
     117             :                 __field(unsigned int, flags)
     118             :                 __field(int, error)
     119             :         ),
     120             :         TP_fast_assign(
     121             :                 __entry->dev = ip->i_mount->m_super->s_dev;
     122             :                 __entry->ino = ip->i_ino;
     123             :                 __entry->type = sm->sm_type;
     124             :                 __entry->agno = sm->sm_agno;
     125             :                 __entry->inum = sm->sm_ino;
     126             :                 __entry->gen = sm->sm_gen;
     127             :                 __entry->flags = sm->sm_flags;
     128             :                 __entry->error = error;
     129             :         ),
     130             :         TP_printk("dev %d:%d ino 0x%llx type %s agno 0x%x inum 0x%llx gen 0x%x flags (%s) error %d",
     131             :                   MAJOR(__entry->dev), MINOR(__entry->dev),
     132             :                   __entry->ino,
     133             :                   __print_symbolic(__entry->type, XFS_SCRUB_TYPE_STRINGS),
     134             :                   __entry->agno,
     135             :                   __entry->inum,
     136             :                   __entry->gen,
     137             :                   __print_flags(__entry->flags, "|", XFS_SCRUB_FLAG_STRINGS),
     138             :                   __entry->error)
     139             : )
     140             : #define DEFINE_SCRUB_EVENT(name) \
     141             : DEFINE_EVENT(xchk_class, name, \
     142             :         TP_PROTO(struct xfs_inode *ip, struct xfs_scrub_metadata *sm, \
     143             :                  int error), \
     144             :         TP_ARGS(ip, sm, error))
     145             : 
     146  2185359959 : DEFINE_SCRUB_EVENT(xchk_start);
     147  2191349309 : DEFINE_SCRUB_EVENT(xchk_done);
     148       77654 : DEFINE_SCRUB_EVENT(xchk_deadlock_retry);
     149   316509093 : DEFINE_SCRUB_EVENT(xrep_attempt);
     150   316582586 : DEFINE_SCRUB_EVENT(xrep_done);
     151             : 
     152           0 : DECLARE_EVENT_CLASS(xchk_fsgate_class,
     153             :         TP_PROTO(struct xfs_scrub *sc, unsigned int fsgate_flags),
     154             :         TP_ARGS(sc, fsgate_flags),
     155             :         TP_STRUCT__entry(
     156             :                 __field(dev_t, dev)
     157             :                 __field(unsigned int, type)
     158             :                 __field(unsigned int, fsgate_flags)
     159             :         ),
     160             :         TP_fast_assign(
     161             :                 __entry->dev = sc->mp->m_super->s_dev;
     162             :                 __entry->type = sc->sm->sm_type;
     163             :                 __entry->fsgate_flags = fsgate_flags;
     164             :         ),
     165             :         TP_printk("dev %d:%d type %s fsgates '%s'",
     166             :                   MAJOR(__entry->dev), MINOR(__entry->dev),
     167             :                   __print_symbolic(__entry->type, XFS_SCRUB_TYPE_STRINGS),
     168             :                   __print_flags(__entry->fsgate_flags, "|", XFS_SCRUB_STATE_STRINGS))
     169             : )
     170             : 
     171             : #define DEFINE_SCRUB_FSHOOK_EVENT(name) \
     172             : DEFINE_EVENT(xchk_fsgate_class, name, \
     173             :         TP_PROTO(struct xfs_scrub *sc, unsigned int fsgates_flags), \
     174             :         TP_ARGS(sc, fsgates_flags))
     175             : 
     176      103673 : DEFINE_SCRUB_FSHOOK_EVENT(xchk_fsgates_enable);
     177      103676 : DEFINE_SCRUB_FSHOOK_EVENT(xchk_fsgates_disable);
     178             : 
     179          30 : TRACE_EVENT(xchk_op_error,
     180             :         TP_PROTO(struct xfs_scrub *sc, xfs_agnumber_t agno,
     181             :                  xfs_agblock_t bno, int error, void *ret_ip),
     182             :         TP_ARGS(sc, agno, bno, error, ret_ip),
     183             :         TP_STRUCT__entry(
     184             :                 __field(dev_t, dev)
     185             :                 __field(unsigned int, type)
     186             :                 __field(xfs_agnumber_t, agno)
     187             :                 __field(xfs_agblock_t, bno)
     188             :                 __field(int, error)
     189             :                 __field(void *, ret_ip)
     190             :         ),
     191             :         TP_fast_assign(
     192             :                 __entry->dev = sc->mp->m_super->s_dev;
     193             :                 __entry->type = sc->sm->sm_type;
     194             :                 __entry->agno = agno;
     195             :                 __entry->bno = bno;
     196             :                 __entry->error = error;
     197             :                 __entry->ret_ip = ret_ip;
     198             :         ),
     199             :         TP_printk("dev %d:%d type %s agno 0x%x agbno 0x%x error %d ret_ip %pS",
     200             :                   MAJOR(__entry->dev), MINOR(__entry->dev),
     201             :                   __print_symbolic(__entry->type, XFS_SCRUB_TYPE_STRINGS),
     202             :                   __entry->agno,
     203             :                   __entry->bno,
     204             :                   __entry->error,
     205             :                   __entry->ret_ip)
     206             : );
     207             : 
     208          11 : TRACE_EVENT(xchk_file_op_error,
     209             :         TP_PROTO(struct xfs_scrub *sc, int whichfork,
     210             :                  xfs_fileoff_t offset, int error, void *ret_ip),
     211             :         TP_ARGS(sc, whichfork, offset, error, ret_ip),
     212             :         TP_STRUCT__entry(
     213             :                 __field(dev_t, dev)
     214             :                 __field(xfs_ino_t, ino)
     215             :                 __field(int, whichfork)
     216             :                 __field(unsigned int, type)
     217             :                 __field(xfs_fileoff_t, offset)
     218             :                 __field(int, error)
     219             :                 __field(void *, ret_ip)
     220             :         ),
     221             :         TP_fast_assign(
     222             :                 __entry->dev = sc->ip->i_mount->m_super->s_dev;
     223             :                 __entry->ino = sc->ip->i_ino;
     224             :                 __entry->whichfork = whichfork;
     225             :                 __entry->type = sc->sm->sm_type;
     226             :                 __entry->offset = offset;
     227             :                 __entry->error = error;
     228             :                 __entry->ret_ip = ret_ip;
     229             :         ),
     230             :         TP_printk("dev %d:%d ino 0x%llx fork %s type %s fileoff 0x%llx error %d ret_ip %pS",
     231             :                   MAJOR(__entry->dev), MINOR(__entry->dev),
     232             :                   __entry->ino,
     233             :                   __print_symbolic(__entry->whichfork, XFS_WHICHFORK_STRINGS),
     234             :                   __print_symbolic(__entry->type, XFS_SCRUB_TYPE_STRINGS),
     235             :                   __entry->offset,
     236             :                   __entry->error,
     237             :                   __entry->ret_ip)
     238             : );
     239             : 
     240           0 : DECLARE_EVENT_CLASS(xchk_block_error_class,
     241             :         TP_PROTO(struct xfs_scrub *sc, xfs_daddr_t daddr, void *ret_ip),
     242             :         TP_ARGS(sc, daddr, ret_ip),
     243             :         TP_STRUCT__entry(
     244             :                 __field(dev_t, dev)
     245             :                 __field(unsigned int, type)
     246             :                 __field(xfs_agnumber_t, agno)
     247             :                 __field(xfs_agblock_t, agbno)
     248             :                 __field(void *, ret_ip)
     249             :         ),
     250             :         TP_fast_assign(
     251             :                 __entry->dev = sc->mp->m_super->s_dev;
     252             :                 __entry->type = sc->sm->sm_type;
     253             :                 __entry->agno = xfs_daddr_to_agno(sc->mp, daddr);
     254             :                 __entry->agbno = xfs_daddr_to_agbno(sc->mp, daddr);
     255             :                 __entry->ret_ip = ret_ip;
     256             :         ),
     257             :         TP_printk("dev %d:%d type %s agno 0x%x agbno 0x%x ret_ip %pS",
     258             :                   MAJOR(__entry->dev), MINOR(__entry->dev),
     259             :                   __print_symbolic(__entry->type, XFS_SCRUB_TYPE_STRINGS),
     260             :                   __entry->agno,
     261             :                   __entry->agbno,
     262             :                   __entry->ret_ip)
     263             : )
     264             : 
     265             : #define DEFINE_SCRUB_BLOCK_ERROR_EVENT(name) \
     266             : DEFINE_EVENT(xchk_block_error_class, name, \
     267             :         TP_PROTO(struct xfs_scrub *sc, xfs_daddr_t daddr, \
     268             :                  void *ret_ip), \
     269             :         TP_ARGS(sc, daddr, ret_ip))
     270             : 
     271           0 : DEFINE_SCRUB_BLOCK_ERROR_EVENT(xchk_fs_error);
     272           0 : DEFINE_SCRUB_BLOCK_ERROR_EVENT(xchk_block_error);
     273     2705192 : DEFINE_SCRUB_BLOCK_ERROR_EVENT(xchk_block_preen);
     274             : 
     275           0 : DECLARE_EVENT_CLASS(xchk_ino_error_class,
     276             :         TP_PROTO(struct xfs_scrub *sc, xfs_ino_t ino, void *ret_ip),
     277             :         TP_ARGS(sc, ino, ret_ip),
     278             :         TP_STRUCT__entry(
     279             :                 __field(dev_t, dev)
     280             :                 __field(xfs_ino_t, ino)
     281             :                 __field(unsigned int, type)
     282             :                 __field(void *, ret_ip)
     283             :         ),
     284             :         TP_fast_assign(
     285             :                 __entry->dev = sc->mp->m_super->s_dev;
     286             :                 __entry->ino = ino;
     287             :                 __entry->type = sc->sm->sm_type;
     288             :                 __entry->ret_ip = ret_ip;
     289             :         ),
     290             :         TP_printk("dev %d:%d ino 0x%llx type %s ret_ip %pS",
     291             :                   MAJOR(__entry->dev), MINOR(__entry->dev),
     292             :                   __entry->ino,
     293             :                   __print_symbolic(__entry->type, XFS_SCRUB_TYPE_STRINGS),
     294             :                   __entry->ret_ip)
     295             : )
     296             : 
     297             : #define DEFINE_SCRUB_INO_ERROR_EVENT(name) \
     298             : DEFINE_EVENT(xchk_ino_error_class, name, \
     299             :         TP_PROTO(struct xfs_scrub *sc, xfs_ino_t ino, \
     300             :                  void *ret_ip), \
     301             :         TP_ARGS(sc, ino, ret_ip))
     302             : 
     303           0 : DEFINE_SCRUB_INO_ERROR_EVENT(xchk_ino_error);
     304     3578539 : DEFINE_SCRUB_INO_ERROR_EVENT(xchk_ino_preen);
     305           0 : DEFINE_SCRUB_INO_ERROR_EVENT(xchk_ino_warning);
     306             : 
     307           0 : DECLARE_EVENT_CLASS(xchk_fblock_error_class,
     308             :         TP_PROTO(struct xfs_scrub *sc, int whichfork,
     309             :                  xfs_fileoff_t offset, void *ret_ip),
     310             :         TP_ARGS(sc, whichfork, offset, ret_ip),
     311             :         TP_STRUCT__entry(
     312             :                 __field(dev_t, dev)
     313             :                 __field(xfs_ino_t, ino)
     314             :                 __field(int, whichfork)
     315             :                 __field(unsigned int, type)
     316             :                 __field(xfs_fileoff_t, offset)
     317             :                 __field(void *, ret_ip)
     318             :         ),
     319             :         TP_fast_assign(
     320             :                 __entry->dev = sc->ip->i_mount->m_super->s_dev;
     321             :                 __entry->ino = sc->ip->i_ino;
     322             :                 __entry->whichfork = whichfork;
     323             :                 __entry->type = sc->sm->sm_type;
     324             :                 __entry->offset = offset;
     325             :                 __entry->ret_ip = ret_ip;
     326             :         ),
     327             :         TP_printk("dev %d:%d ino 0x%llx fork %s type %s fileoff 0x%llx ret_ip %pS",
     328             :                   MAJOR(__entry->dev), MINOR(__entry->dev),
     329             :                   __entry->ino,
     330             :                   __print_symbolic(__entry->whichfork, XFS_WHICHFORK_STRINGS),
     331             :                   __print_symbolic(__entry->type, XFS_SCRUB_TYPE_STRINGS),
     332             :                   __entry->offset,
     333             :                   __entry->ret_ip)
     334             : );
     335             : 
     336             : #define DEFINE_SCRUB_FBLOCK_ERROR_EVENT(name) \
     337             : DEFINE_EVENT(xchk_fblock_error_class, name, \
     338             :         TP_PROTO(struct xfs_scrub *sc, int whichfork, \
     339             :                  xfs_fileoff_t offset, void *ret_ip), \
     340             :         TP_ARGS(sc, whichfork, offset, ret_ip))
     341             : 
     342          22 : DEFINE_SCRUB_FBLOCK_ERROR_EVENT(xchk_fblock_error);
     343         147 : DEFINE_SCRUB_FBLOCK_ERROR_EVENT(xchk_fblock_warning);
     344             : 
     345      539825 : TRACE_EVENT(xchk_incomplete,
     346             :         TP_PROTO(struct xfs_scrub *sc, void *ret_ip),
     347             :         TP_ARGS(sc, ret_ip),
     348             :         TP_STRUCT__entry(
     349             :                 __field(dev_t, dev)
     350             :                 __field(unsigned int, type)
     351             :                 __field(void *, ret_ip)
     352             :         ),
     353             :         TP_fast_assign(
     354             :                 __entry->dev = sc->mp->m_super->s_dev;
     355             :                 __entry->type = sc->sm->sm_type;
     356             :                 __entry->ret_ip = ret_ip;
     357             :         ),
     358             :         TP_printk("dev %d:%d type %s ret_ip %pS",
     359             :                   MAJOR(__entry->dev), MINOR(__entry->dev),
     360             :                   __print_symbolic(__entry->type, XFS_SCRUB_TYPE_STRINGS),
     361             :                   __entry->ret_ip)
     362             : );
     363             : 
     364           0 : TRACE_EVENT(xchk_btree_op_error,
     365             :         TP_PROTO(struct xfs_scrub *sc, struct xfs_btree_cur *cur,
     366             :                  int level, int error, void *ret_ip),
     367             :         TP_ARGS(sc, cur, level, error, ret_ip),
     368             :         TP_STRUCT__entry(
     369             :                 __field(dev_t, dev)
     370             :                 __field(unsigned int, type)
     371             :                 __field(xfs_btnum_t, btnum)
     372             :                 __field(int, level)
     373             :                 __field(xfs_agnumber_t, agno)
     374             :                 __field(xfs_agblock_t, bno)
     375             :                 __field(int, ptr)
     376             :                 __field(int, error)
     377             :                 __field(void *, ret_ip)
     378             :         ),
     379             :         TP_fast_assign(
     380             :                 xfs_fsblock_t fsbno = xchk_btree_cur_fsbno(cur, level);
     381             : 
     382             :                 __entry->dev = sc->mp->m_super->s_dev;
     383             :                 __entry->type = sc->sm->sm_type;
     384             :                 __entry->btnum = cur->bc_btnum;
     385             :                 __entry->level = level;
     386             :                 __entry->agno = XFS_FSB_TO_AGNO(cur->bc_mp, fsbno);
     387             :                 __entry->bno = XFS_FSB_TO_AGBNO(cur->bc_mp, fsbno);
     388             :                 __entry->ptr = cur->bc_levels[level].ptr;
     389             :                 __entry->error = error;
     390             :                 __entry->ret_ip = ret_ip;
     391             :         ),
     392             :         TP_printk("dev %d:%d type %s btree %s level %d ptr %d agno 0x%x agbno 0x%x error %d ret_ip %pS",
     393             :                   MAJOR(__entry->dev), MINOR(__entry->dev),
     394             :                   __print_symbolic(__entry->type, XFS_SCRUB_TYPE_STRINGS),
     395             :                   __print_symbolic(__entry->btnum, XFS_BTNUM_STRINGS),
     396             :                   __entry->level,
     397             :                   __entry->ptr,
     398             :                   __entry->agno,
     399             :                   __entry->bno,
     400             :                   __entry->error,
     401             :                   __entry->ret_ip)
     402             : );
     403             : 
     404           4 : TRACE_EVENT(xchk_ifork_btree_op_error,
     405             :         TP_PROTO(struct xfs_scrub *sc, struct xfs_btree_cur *cur,
     406             :                  int level, int error, void *ret_ip),
     407             :         TP_ARGS(sc, cur, level, error, ret_ip),
     408             :         TP_STRUCT__entry(
     409             :                 __field(dev_t, dev)
     410             :                 __field(xfs_ino_t, ino)
     411             :                 __field(int, whichfork)
     412             :                 __field(unsigned int, type)
     413             :                 __field(xfs_btnum_t, btnum)
     414             :                 __field(int, level)
     415             :                 __field(int, ptr)
     416             :                 __field(xfs_agnumber_t, agno)
     417             :                 __field(xfs_agblock_t, bno)
     418             :                 __field(int, error)
     419             :                 __field(void *, ret_ip)
     420             :         ),
     421             :         TP_fast_assign(
     422             :                 xfs_fsblock_t fsbno = xchk_btree_cur_fsbno(cur, level);
     423             :                 __entry->dev = sc->mp->m_super->s_dev;
     424             :                 __entry->ino = sc->ip->i_ino;
     425             :                 __entry->whichfork = cur->bc_ino.whichfork;
     426             :                 __entry->type = sc->sm->sm_type;
     427             :                 __entry->btnum = cur->bc_btnum;
     428             :                 __entry->level = level;
     429             :                 __entry->ptr = cur->bc_levels[level].ptr;
     430             :                 __entry->agno = XFS_FSB_TO_AGNO(cur->bc_mp, fsbno);
     431             :                 __entry->bno = XFS_FSB_TO_AGBNO(cur->bc_mp, fsbno);
     432             :                 __entry->error = error;
     433             :                 __entry->ret_ip = ret_ip;
     434             :         ),
     435             :         TP_printk("dev %d:%d ino 0x%llx fork %s type %s btree %s level %d ptr %d agno 0x%x agbno 0x%x error %d ret_ip %pS",
     436             :                   MAJOR(__entry->dev), MINOR(__entry->dev),
     437             :                   __entry->ino,
     438             :                   __print_symbolic(__entry->whichfork, XFS_WHICHFORK_STRINGS),
     439             :                   __print_symbolic(__entry->type, XFS_SCRUB_TYPE_STRINGS),
     440             :                   __print_symbolic(__entry->btnum, XFS_BTNUM_STRINGS),
     441             :                   __entry->level,
     442             :                   __entry->ptr,
     443             :                   __entry->agno,
     444             :                   __entry->bno,
     445             :                   __entry->error,
     446             :                   __entry->ret_ip)
     447             : );
     448             : 
     449           0 : TRACE_EVENT(xchk_btree_error,
     450             :         TP_PROTO(struct xfs_scrub *sc, struct xfs_btree_cur *cur,
     451             :                  int level, void *ret_ip),
     452             :         TP_ARGS(sc, cur, level, ret_ip),
     453             :         TP_STRUCT__entry(
     454             :                 __field(dev_t, dev)
     455             :                 __field(unsigned int, type)
     456             :                 __field(xfs_btnum_t, btnum)
     457             :                 __field(int, level)
     458             :                 __field(xfs_agnumber_t, agno)
     459             :                 __field(xfs_agblock_t, bno)
     460             :                 __field(int, ptr)
     461             :                 __field(void *, ret_ip)
     462             :         ),
     463             :         TP_fast_assign(
     464             :                 xfs_fsblock_t fsbno = xchk_btree_cur_fsbno(cur, level);
     465             :                 __entry->dev = sc->mp->m_super->s_dev;
     466             :                 __entry->type = sc->sm->sm_type;
     467             :                 __entry->btnum = cur->bc_btnum;
     468             :                 __entry->level = level;
     469             :                 __entry->agno = XFS_FSB_TO_AGNO(cur->bc_mp, fsbno);
     470             :                 __entry->bno = XFS_FSB_TO_AGBNO(cur->bc_mp, fsbno);
     471             :                 __entry->ptr = cur->bc_levels[level].ptr;
     472             :                 __entry->ret_ip = ret_ip;
     473             :         ),
     474             :         TP_printk("dev %d:%d type %s btree %s level %d ptr %d agno 0x%x agbno 0x%x ret_ip %pS",
     475             :                   MAJOR(__entry->dev), MINOR(__entry->dev),
     476             :                   __print_symbolic(__entry->type, XFS_SCRUB_TYPE_STRINGS),
     477             :                   __print_symbolic(__entry->btnum, XFS_BTNUM_STRINGS),
     478             :                   __entry->level,
     479             :                   __entry->ptr,
     480             :                   __entry->agno,
     481             :                   __entry->bno,
     482             :                   __entry->ret_ip)
     483             : );
     484             : 
     485           0 : TRACE_EVENT(xchk_ifork_btree_error,
     486             :         TP_PROTO(struct xfs_scrub *sc, struct xfs_btree_cur *cur,
     487             :                  int level, void *ret_ip),
     488             :         TP_ARGS(sc, cur, level, ret_ip),
     489             :         TP_STRUCT__entry(
     490             :                 __field(dev_t, dev)
     491             :                 __field(xfs_ino_t, ino)
     492             :                 __field(int, whichfork)
     493             :                 __field(unsigned int, type)
     494             :                 __field(xfs_btnum_t, btnum)
     495             :                 __field(int, level)
     496             :                 __field(xfs_agnumber_t, agno)
     497             :                 __field(xfs_agblock_t, bno)
     498             :                 __field(int, ptr)
     499             :                 __field(void *, ret_ip)
     500             :         ),
     501             :         TP_fast_assign(
     502             :                 xfs_fsblock_t fsbno = xchk_btree_cur_fsbno(cur, level);
     503             :                 __entry->dev = sc->mp->m_super->s_dev;
     504             :                 __entry->ino = sc->ip->i_ino;
     505             :                 __entry->whichfork = cur->bc_ino.whichfork;
     506             :                 __entry->type = sc->sm->sm_type;
     507             :                 __entry->btnum = cur->bc_btnum;
     508             :                 __entry->level = level;
     509             :                 __entry->agno = XFS_FSB_TO_AGNO(cur->bc_mp, fsbno);
     510             :                 __entry->bno = XFS_FSB_TO_AGBNO(cur->bc_mp, fsbno);
     511             :                 __entry->ptr = cur->bc_levels[level].ptr;
     512             :                 __entry->ret_ip = ret_ip;
     513             :         ),
     514             :         TP_printk("dev %d:%d ino 0x%llx fork %s type %s btree %s level %d ptr %d agno 0x%x agbno 0x%x ret_ip %pS",
     515             :                   MAJOR(__entry->dev), MINOR(__entry->dev),
     516             :                   __entry->ino,
     517             :                   __print_symbolic(__entry->whichfork, XFS_WHICHFORK_STRINGS),
     518             :                   __print_symbolic(__entry->type, XFS_SCRUB_TYPE_STRINGS),
     519             :                   __print_symbolic(__entry->btnum, XFS_BTNUM_STRINGS),
     520             :                   __entry->level,
     521             :                   __entry->ptr,
     522             :                   __entry->agno,
     523             :                   __entry->bno,
     524             :                   __entry->ret_ip)
     525             : );
     526             : 
     527           0 : DECLARE_EVENT_CLASS(xchk_sbtree_class,
     528             :         TP_PROTO(struct xfs_scrub *sc, struct xfs_btree_cur *cur,
     529             :                  int level),
     530             :         TP_ARGS(sc, cur, level),
     531             :         TP_STRUCT__entry(
     532             :                 __field(dev_t, dev)
     533             :                 __field(int, type)
     534             :                 __field(xfs_btnum_t, btnum)
     535             :                 __field(xfs_agnumber_t, agno)
     536             :                 __field(xfs_agblock_t, bno)
     537             :                 __field(int, level)
     538             :                 __field(int, nlevels)
     539             :                 __field(int, ptr)
     540             :         ),
     541             :         TP_fast_assign(
     542             :                 xfs_fsblock_t fsbno = xchk_btree_cur_fsbno(cur, level);
     543             : 
     544             :                 __entry->dev = sc->mp->m_super->s_dev;
     545             :                 __entry->type = sc->sm->sm_type;
     546             :                 __entry->btnum = cur->bc_btnum;
     547             :                 __entry->agno = XFS_FSB_TO_AGNO(cur->bc_mp, fsbno);
     548             :                 __entry->bno = XFS_FSB_TO_AGBNO(cur->bc_mp, fsbno);
     549             :                 __entry->level = level;
     550             :                 __entry->nlevels = cur->bc_nlevels;
     551             :                 __entry->ptr = cur->bc_levels[level].ptr;
     552             :         ),
     553             :         TP_printk("dev %d:%d type %s btree %s agno 0x%x agbno 0x%x level %d nlevels %d ptr %d",
     554             :                   MAJOR(__entry->dev), MINOR(__entry->dev),
     555             :                   __print_symbolic(__entry->type, XFS_SCRUB_TYPE_STRINGS),
     556             :                   __print_symbolic(__entry->btnum, XFS_BTNUM_STRINGS),
     557             :                   __entry->agno,
     558             :                   __entry->bno,
     559             :                   __entry->level,
     560             :                   __entry->nlevels,
     561             :                   __entry->ptr)
     562             : )
     563             : #define DEFINE_SCRUB_SBTREE_EVENT(name) \
     564             : DEFINE_EVENT(xchk_sbtree_class, name, \
     565             :         TP_PROTO(struct xfs_scrub *sc, struct xfs_btree_cur *cur, \
     566             :                  int level), \
     567             :         TP_ARGS(sc, cur, level))
     568             : 
     569  1294813461 : DEFINE_SCRUB_SBTREE_EVENT(xchk_btree_rec);
     570    10136931 : DEFINE_SCRUB_SBTREE_EVENT(xchk_btree_key);
     571             : 
     572           0 : TRACE_EVENT(xchk_xref_error,
     573             :         TP_PROTO(struct xfs_scrub *sc, int error, void *ret_ip),
     574             :         TP_ARGS(sc, error, ret_ip),
     575             :         TP_STRUCT__entry(
     576             :                 __field(dev_t, dev)
     577             :                 __field(int, type)
     578             :                 __field(int, error)
     579             :                 __field(void *, ret_ip)
     580             :         ),
     581             :         TP_fast_assign(
     582             :                 __entry->dev = sc->mp->m_super->s_dev;
     583             :                 __entry->type = sc->sm->sm_type;
     584             :                 __entry->error = error;
     585             :                 __entry->ret_ip = ret_ip;
     586             :         ),
     587             :         TP_printk("dev %d:%d type %s xref error %d ret_ip %pS",
     588             :                   MAJOR(__entry->dev), MINOR(__entry->dev),
     589             :                   __print_symbolic(__entry->type, XFS_SCRUB_TYPE_STRINGS),
     590             :                   __entry->error,
     591             :                   __entry->ret_ip)
     592             : );
     593             : 
     594    88664924 : TRACE_EVENT(xchk_iallocbt_check_cluster,
     595             :         TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
     596             :                  xfs_agino_t startino, xfs_daddr_t map_daddr,
     597             :                  unsigned short map_len, unsigned int chunk_ino,
     598             :                  unsigned int nr_inodes, uint16_t cluster_mask,
     599             :                  uint16_t holemask, unsigned int cluster_ino),
     600             :         TP_ARGS(mp, agno, startino, map_daddr, map_len, chunk_ino, nr_inodes,
     601             :                 cluster_mask, holemask, cluster_ino),
     602             :         TP_STRUCT__entry(
     603             :                 __field(dev_t, dev)
     604             :                 __field(xfs_agnumber_t, agno)
     605             :                 __field(xfs_agino_t, startino)
     606             :                 __field(xfs_daddr_t, map_daddr)
     607             :                 __field(unsigned short, map_len)
     608             :                 __field(unsigned int, chunk_ino)
     609             :                 __field(unsigned int, nr_inodes)
     610             :                 __field(unsigned int, cluster_ino)
     611             :                 __field(uint16_t, cluster_mask)
     612             :                 __field(uint16_t, holemask)
     613             :         ),
     614             :         TP_fast_assign(
     615             :                 __entry->dev = mp->m_super->s_dev;
     616             :                 __entry->agno = agno;
     617             :                 __entry->startino = startino;
     618             :                 __entry->map_daddr = map_daddr;
     619             :                 __entry->map_len = map_len;
     620             :                 __entry->chunk_ino = chunk_ino;
     621             :                 __entry->nr_inodes = nr_inodes;
     622             :                 __entry->cluster_mask = cluster_mask;
     623             :                 __entry->holemask = holemask;
     624             :                 __entry->cluster_ino = cluster_ino;
     625             :         ),
     626             :         TP_printk("dev %d:%d agno 0x%x startino 0x%x daddr 0x%llx bbcount 0x%x chunkino 0x%x nr_inodes %u cluster_mask 0x%x holemask 0x%x cluster_ino 0x%x",
     627             :                   MAJOR(__entry->dev), MINOR(__entry->dev),
     628             :                   __entry->agno,
     629             :                   __entry->startino,
     630             :                   __entry->map_daddr,
     631             :                   __entry->map_len,
     632             :                   __entry->chunk_ino,
     633             :                   __entry->nr_inodes,
     634             :                   __entry->cluster_mask,
     635             :                   __entry->holemask,
     636             :                   __entry->cluster_ino)
     637             : )
     638             : 
     639      376914 : TRACE_EVENT(xchk_fscounters_calc,
     640             :         TP_PROTO(struct xfs_mount *mp, uint64_t icount, uint64_t ifree,
     641             :                  uint64_t fdblocks, uint64_t delalloc),
     642             :         TP_ARGS(mp, icount, ifree, fdblocks, delalloc),
     643             :         TP_STRUCT__entry(
     644             :                 __field(dev_t, dev)
     645             :                 __field(int64_t, icount_sb)
     646             :                 __field(uint64_t, icount_calculated)
     647             :                 __field(int64_t, ifree_sb)
     648             :                 __field(uint64_t, ifree_calculated)
     649             :                 __field(int64_t, fdblocks_sb)
     650             :                 __field(uint64_t, fdblocks_calculated)
     651             :                 __field(uint64_t, delalloc)
     652             :         ),
     653             :         TP_fast_assign(
     654             :                 __entry->dev = mp->m_super->s_dev;
     655             :                 __entry->icount_sb = mp->m_sb.sb_icount;
     656             :                 __entry->icount_calculated = icount;
     657             :                 __entry->ifree_sb = mp->m_sb.sb_ifree;
     658             :                 __entry->ifree_calculated = ifree;
     659             :                 __entry->fdblocks_sb = mp->m_sb.sb_fdblocks;
     660             :                 __entry->fdblocks_calculated = fdblocks;
     661             :                 __entry->delalloc = delalloc;
     662             :         ),
     663             :         TP_printk("dev %d:%d icount %lld:%llu ifree %lld::%llu fdblocks %lld::%llu delalloc %llu",
     664             :                   MAJOR(__entry->dev), MINOR(__entry->dev),
     665             :                   __entry->icount_sb,
     666             :                   __entry->icount_calculated,
     667             :                   __entry->ifree_sb,
     668             :                   __entry->ifree_calculated,
     669             :                   __entry->fdblocks_sb,
     670             :                   __entry->fdblocks_calculated,
     671             :                   __entry->delalloc)
     672             : )
     673             : 
     674     1507652 : TRACE_EVENT(xchk_fscounters_within_range,
     675             :         TP_PROTO(struct xfs_mount *mp, uint64_t expected, int64_t curr_value,
     676             :                  int64_t old_value),
     677             :         TP_ARGS(mp, expected, curr_value, old_value),
     678             :         TP_STRUCT__entry(
     679             :                 __field(dev_t, dev)
     680             :                 __field(uint64_t, expected)
     681             :                 __field(int64_t, curr_value)
     682             :                 __field(int64_t, old_value)
     683             :         ),
     684             :         TP_fast_assign(
     685             :                 __entry->dev = mp->m_super->s_dev;
     686             :                 __entry->expected = expected;
     687             :                 __entry->curr_value = curr_value;
     688             :                 __entry->old_value = old_value;
     689             :         ),
     690             :         TP_printk("dev %d:%d expected %llu curr_value %lld old_value %lld",
     691             :                   MAJOR(__entry->dev), MINOR(__entry->dev),
     692             :                   __entry->expected,
     693             :                   __entry->curr_value,
     694             :                   __entry->old_value)
     695             : )
     696             : 
     697           0 : DECLARE_EVENT_CLASS(xchk_fsfreeze_class,
     698             :         TP_PROTO(struct xfs_scrub *sc, int error),
     699             :         TP_ARGS(sc, error),
     700             :         TP_STRUCT__entry(
     701             :                 __field(dev_t, dev)
     702             :                 __field(unsigned int, type)
     703             :                 __field(int, error)
     704             :         ),
     705             :         TP_fast_assign(
     706             :                 __entry->dev = sc->mp->m_super->s_dev;
     707             :                 __entry->type = sc->sm->sm_type;
     708             :                 __entry->error = error;
     709             :         ),
     710             :         TP_printk("dev %d:%d type %s error %d",
     711             :                   MAJOR(__entry->dev), MINOR(__entry->dev),
     712             :                   __print_symbolic(__entry->type, XFS_SCRUB_TYPE_STRINGS),
     713             :                   __entry->error)
     714             : );
     715             : #define DEFINE_XCHK_FSFREEZE_EVENT(name) \
     716             : DEFINE_EVENT(xchk_fsfreeze_class, name, \
     717             :         TP_PROTO(struct xfs_scrub *sc, int error), \
     718             :         TP_ARGS(sc, error))
     719       34775 : DEFINE_XCHK_FSFREEZE_EVENT(xchk_fsfreeze);
     720       34775 : DEFINE_XCHK_FSFREEZE_EVENT(xchk_fsthaw);
     721             : 
     722           0 : TRACE_EVENT(xchk_refcount_incorrect,
     723             :         TP_PROTO(struct xfs_perag *pag, const struct xfs_refcount_irec *irec,
     724             :                  xfs_nlink_t seen),
     725             :         TP_ARGS(pag, irec, seen),
     726             :         TP_STRUCT__entry(
     727             :                 __field(dev_t, dev)
     728             :                 __field(xfs_agnumber_t, agno)
     729             :                 __field(enum xfs_refc_domain, domain)
     730             :                 __field(xfs_agblock_t, startblock)
     731             :                 __field(xfs_extlen_t, blockcount)
     732             :                 __field(xfs_nlink_t, refcount)
     733             :                 __field(xfs_nlink_t, seen)
     734             :         ),
     735             :         TP_fast_assign(
     736             :                 __entry->dev = pag->pag_mount->m_super->s_dev;
     737             :                 __entry->agno = pag->pag_agno;
     738             :                 __entry->domain = irec->rc_domain;
     739             :                 __entry->startblock = irec->rc_startblock;
     740             :                 __entry->blockcount = irec->rc_blockcount;
     741             :                 __entry->refcount = irec->rc_refcount;
     742             :                 __entry->seen = seen;
     743             :         ),
     744             :         TP_printk("dev %d:%d agno 0x%x dom %s agbno 0x%x fsbcount 0x%x refcount %u seen %u",
     745             :                   MAJOR(__entry->dev), MINOR(__entry->dev),
     746             :                   __entry->agno,
     747             :                   __print_symbolic(__entry->domain, XFS_REFC_DOMAIN_STRINGS),
     748             :                   __entry->startblock,
     749             :                   __entry->blockcount,
     750             :                   __entry->refcount,
     751             :                   __entry->seen)
     752             : )
     753             : 
     754             : /* repair tracepoints */
     755             : #if IS_ENABLED(CONFIG_XFS_ONLINE_REPAIR)
     756             : 
     757           0 : DECLARE_EVENT_CLASS(xrep_extent_class,
     758             :         TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
     759             :                  xfs_agblock_t agbno, xfs_extlen_t len),
     760             :         TP_ARGS(mp, agno, agbno, len),
     761             :         TP_STRUCT__entry(
     762             :                 __field(dev_t, dev)
     763             :                 __field(xfs_agnumber_t, agno)
     764             :                 __field(xfs_agblock_t, agbno)
     765             :                 __field(xfs_extlen_t, len)
     766             :         ),
     767             :         TP_fast_assign(
     768             :                 __entry->dev = mp->m_super->s_dev;
     769             :                 __entry->agno = agno;
     770             :                 __entry->agbno = agbno;
     771             :                 __entry->len = len;
     772             :         ),
     773             :         TP_printk("dev %d:%d agno 0x%x agbno 0x%x fsbcount 0x%x",
     774             :                   MAJOR(__entry->dev), MINOR(__entry->dev),
     775             :                   __entry->agno,
     776             :                   __entry->agbno,
     777             :                   __entry->len)
     778             : );
     779             : #define DEFINE_REPAIR_EXTENT_EVENT(name) \
     780             : DEFINE_EVENT(xrep_extent_class, name, \
     781             :         TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, \
     782             :                  xfs_agblock_t agbno, xfs_extlen_t len), \
     783             :         TP_ARGS(mp, agno, agbno, len))
     784           0 : DEFINE_REPAIR_EXTENT_EVENT(xrep_dispose_btree_extent);
     785      753300 : DEFINE_REPAIR_EXTENT_EVENT(xrep_agfl_insert);
     786             : 
     787           0 : DECLARE_EVENT_CLASS(xrep_rmap_class,
     788             :         TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
     789             :                  xfs_agblock_t agbno, xfs_extlen_t len,
     790             :                  uint64_t owner, uint64_t offset, unsigned int flags),
     791             :         TP_ARGS(mp, agno, agbno, len, owner, offset, flags),
     792             :         TP_STRUCT__entry(
     793             :                 __field(dev_t, dev)
     794             :                 __field(xfs_agnumber_t, agno)
     795             :                 __field(xfs_agblock_t, agbno)
     796             :                 __field(xfs_extlen_t, len)
     797             :                 __field(uint64_t, owner)
     798             :                 __field(uint64_t, offset)
     799             :                 __field(unsigned int, flags)
     800             :         ),
     801             :         TP_fast_assign(
     802             :                 __entry->dev = mp->m_super->s_dev;
     803             :                 __entry->agno = agno;
     804             :                 __entry->agbno = agbno;
     805             :                 __entry->len = len;
     806             :                 __entry->owner = owner;
     807             :                 __entry->offset = offset;
     808             :                 __entry->flags = flags;
     809             :         ),
     810             :         TP_printk("dev %d:%d agno 0x%x agbno 0x%x fsbcount 0x%x owner 0x%llx fileoff 0x%llx flags 0x%x",
     811             :                   MAJOR(__entry->dev), MINOR(__entry->dev),
     812             :                   __entry->agno,
     813             :                   __entry->agbno,
     814             :                   __entry->len,
     815             :                   __entry->owner,
     816             :                   __entry->offset,
     817             :                   __entry->flags)
     818             : );
     819             : #define DEFINE_REPAIR_RMAP_EVENT(name) \
     820             : DEFINE_EVENT(xrep_rmap_class, name, \
     821             :         TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, \
     822             :                  xfs_agblock_t agbno, xfs_extlen_t len, \
     823             :                  uint64_t owner, uint64_t offset, unsigned int flags), \
     824             :         TP_ARGS(mp, agno, agbno, len, owner, offset, flags))
     825           0 : DEFINE_REPAIR_RMAP_EVENT(xrep_alloc_extent_fn);
     826           0 : DEFINE_REPAIR_RMAP_EVENT(xrep_ialloc_extent_fn);
     827           0 : DEFINE_REPAIR_RMAP_EVENT(xrep_rmap_extent_fn);
     828           0 : DEFINE_REPAIR_RMAP_EVENT(xrep_bmap_extent_fn);
     829             : 
     830           0 : TRACE_EVENT(xrep_refcount_extent_fn,
     831             :         TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
     832             :                  struct xfs_refcount_irec *irec),
     833             :         TP_ARGS(mp, agno, irec),
     834             :         TP_STRUCT__entry(
     835             :                 __field(dev_t, dev)
     836             :                 __field(xfs_agnumber_t, agno)
     837             :                 __field(xfs_agblock_t, startblock)
     838             :                 __field(xfs_extlen_t, blockcount)
     839             :                 __field(xfs_nlink_t, refcount)
     840             :         ),
     841             :         TP_fast_assign(
     842             :                 __entry->dev = mp->m_super->s_dev;
     843             :                 __entry->agno = agno;
     844             :                 __entry->startblock = irec->rc_startblock;
     845             :                 __entry->blockcount = irec->rc_blockcount;
     846             :                 __entry->refcount = irec->rc_refcount;
     847             :         ),
     848             :         TP_printk("dev %d:%d agno 0x%x agbno 0x%x fsbcount 0x%x refcount %u",
     849             :                   MAJOR(__entry->dev), MINOR(__entry->dev),
     850             :                   __entry->agno,
     851             :                   __entry->startblock,
     852             :                   __entry->blockcount,
     853             :                   __entry->refcount)
     854             : )
     855             : 
     856           0 : TRACE_EVENT(xrep_init_btblock,
     857             :         TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, xfs_agblock_t agbno,
     858             :                  xfs_btnum_t btnum),
     859             :         TP_ARGS(mp, agno, agbno, btnum),
     860             :         TP_STRUCT__entry(
     861             :                 __field(dev_t, dev)
     862             :                 __field(xfs_agnumber_t, agno)
     863             :                 __field(xfs_agblock_t, agbno)
     864             :                 __field(uint32_t, btnum)
     865             :         ),
     866             :         TP_fast_assign(
     867             :                 __entry->dev = mp->m_super->s_dev;
     868             :                 __entry->agno = agno;
     869             :                 __entry->agbno = agbno;
     870             :                 __entry->btnum = btnum;
     871             :         ),
     872             :         TP_printk("dev %d:%d agno 0x%x agbno 0x%x btree %s",
     873             :                   MAJOR(__entry->dev), MINOR(__entry->dev),
     874             :                   __entry->agno,
     875             :                   __entry->agbno,
     876             :                   __print_symbolic(__entry->btnum, XFS_BTNUM_STRINGS))
     877             : )
     878     1482673 : TRACE_EVENT(xrep_findroot_block,
     879             :         TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, xfs_agblock_t agbno,
     880             :                  uint32_t magic, uint16_t level),
     881             :         TP_ARGS(mp, agno, agbno, magic, level),
     882             :         TP_STRUCT__entry(
     883             :                 __field(dev_t, dev)
     884             :                 __field(xfs_agnumber_t, agno)
     885             :                 __field(xfs_agblock_t, agbno)
     886             :                 __field(uint32_t, magic)
     887             :                 __field(uint16_t, level)
     888             :         ),
     889             :         TP_fast_assign(
     890             :                 __entry->dev = mp->m_super->s_dev;
     891             :                 __entry->agno = agno;
     892             :                 __entry->agbno = agbno;
     893             :                 __entry->magic = magic;
     894             :                 __entry->level = level;
     895             :         ),
     896             :         TP_printk("dev %d:%d agno 0x%x agbno 0x%x magic 0x%x level %u",
     897             :                   MAJOR(__entry->dev), MINOR(__entry->dev),
     898             :                   __entry->agno,
     899             :                   __entry->agbno,
     900             :                   __entry->magic,
     901             :                   __entry->level)
     902             : )
     903     3560234 : TRACE_EVENT(xrep_calc_ag_resblks,
     904             :         TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
     905             :                  xfs_agino_t icount, xfs_agblock_t aglen, xfs_agblock_t freelen,
     906             :                  xfs_agblock_t usedlen),
     907             :         TP_ARGS(mp, agno, icount, aglen, freelen, usedlen),
     908             :         TP_STRUCT__entry(
     909             :                 __field(dev_t, dev)
     910             :                 __field(xfs_agnumber_t, agno)
     911             :                 __field(xfs_agino_t, icount)
     912             :                 __field(xfs_agblock_t, aglen)
     913             :                 __field(xfs_agblock_t, freelen)
     914             :                 __field(xfs_agblock_t, usedlen)
     915             :         ),
     916             :         TP_fast_assign(
     917             :                 __entry->dev = mp->m_super->s_dev;
     918             :                 __entry->agno = agno;
     919             :                 __entry->icount = icount;
     920             :                 __entry->aglen = aglen;
     921             :                 __entry->freelen = freelen;
     922             :                 __entry->usedlen = usedlen;
     923             :         ),
     924             :         TP_printk("dev %d:%d agno 0x%x icount %u aglen %u freelen %u usedlen %u",
     925             :                   MAJOR(__entry->dev), MINOR(__entry->dev),
     926             :                   __entry->agno,
     927             :                   __entry->icount,
     928             :                   __entry->aglen,
     929             :                   __entry->freelen,
     930             :                   __entry->usedlen)
     931             : )
     932     3557171 : TRACE_EVENT(xrep_calc_ag_resblks_btsize,
     933             :         TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
     934             :                  xfs_agblock_t bnobt_sz, xfs_agblock_t inobt_sz,
     935             :                  xfs_agblock_t rmapbt_sz, xfs_agblock_t refcbt_sz),
     936             :         TP_ARGS(mp, agno, bnobt_sz, inobt_sz, rmapbt_sz, refcbt_sz),
     937             :         TP_STRUCT__entry(
     938             :                 __field(dev_t, dev)
     939             :                 __field(xfs_agnumber_t, agno)
     940             :                 __field(xfs_agblock_t, bnobt_sz)
     941             :                 __field(xfs_agblock_t, inobt_sz)
     942             :                 __field(xfs_agblock_t, rmapbt_sz)
     943             :                 __field(xfs_agblock_t, refcbt_sz)
     944             :         ),
     945             :         TP_fast_assign(
     946             :                 __entry->dev = mp->m_super->s_dev;
     947             :                 __entry->agno = agno;
     948             :                 __entry->bnobt_sz = bnobt_sz;
     949             :                 __entry->inobt_sz = inobt_sz;
     950             :                 __entry->rmapbt_sz = rmapbt_sz;
     951             :                 __entry->refcbt_sz = refcbt_sz;
     952             :         ),
     953             :         TP_printk("dev %d:%d agno 0x%x bnobt %u inobt %u rmapbt %u refcountbt %u",
     954             :                   MAJOR(__entry->dev), MINOR(__entry->dev),
     955             :                   __entry->agno,
     956             :                   __entry->bnobt_sz,
     957             :                   __entry->inobt_sz,
     958             :                   __entry->rmapbt_sz,
     959             :                   __entry->refcbt_sz)
     960             : )
     961           0 : TRACE_EVENT(xrep_reset_counters,
     962             :         TP_PROTO(struct xfs_mount *mp),
     963             :         TP_ARGS(mp),
     964             :         TP_STRUCT__entry(
     965             :                 __field(dev_t, dev)
     966             :         ),
     967             :         TP_fast_assign(
     968             :                 __entry->dev = mp->m_super->s_dev;
     969             :         ),
     970             :         TP_printk("dev %d:%d",
     971             :                   MAJOR(__entry->dev), MINOR(__entry->dev))
     972             : )
     973             : 
     974           0 : TRACE_EVENT(xrep_ialloc_insert,
     975             :         TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
     976             :                  xfs_agino_t startino, uint16_t holemask, uint8_t count,
     977             :                  uint8_t freecount, uint64_t freemask),
     978             :         TP_ARGS(mp, agno, startino, holemask, count, freecount, freemask),
     979             :         TP_STRUCT__entry(
     980             :                 __field(dev_t, dev)
     981             :                 __field(xfs_agnumber_t, agno)
     982             :                 __field(xfs_agino_t, startino)
     983             :                 __field(uint16_t, holemask)
     984             :                 __field(uint8_t, count)
     985             :                 __field(uint8_t, freecount)
     986             :                 __field(uint64_t, freemask)
     987             :         ),
     988             :         TP_fast_assign(
     989             :                 __entry->dev = mp->m_super->s_dev;
     990             :                 __entry->agno = agno;
     991             :                 __entry->startino = startino;
     992             :                 __entry->holemask = holemask;
     993             :                 __entry->count = count;
     994             :                 __entry->freecount = freecount;
     995             :                 __entry->freemask = freemask;
     996             :         ),
     997             :         TP_printk("dev %d:%d agno 0x%x startino 0x%x holemask 0x%x count %u freecount %u freemask 0x%llx",
     998             :                   MAJOR(__entry->dev), MINOR(__entry->dev),
     999             :                   __entry->agno,
    1000             :                   __entry->startino,
    1001             :                   __entry->holemask,
    1002             :                   __entry->count,
    1003             :                   __entry->freecount,
    1004             :                   __entry->freemask)
    1005             : )
    1006             : 
    1007             : #endif /* IS_ENABLED(CONFIG_XFS_ONLINE_REPAIR) */
    1008             : 
    1009             : #endif /* _TRACE_XFS_SCRUB_TRACE_H */
    1010             : 
    1011             : #undef TRACE_INCLUDE_PATH
    1012             : #define TRACE_INCLUDE_PATH .
    1013             : #define TRACE_INCLUDE_FILE scrub/trace
    1014             : #include <trace/define_trace.h>

Generated by: LCOV version 1.14