fs/xfs/scrub/trace.h
Source file repositories/reference/linux-study-clean/fs/xfs/scrub/trace.h
File Facts
- System
- Linux kernel
- Corpus path
fs/xfs/scrub/trace.h- Extension
.h- Size
- 121692 bytes
- Lines
- 3883
- Domain
- Core OS
- Bucket
- VFS And Filesystem Core
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/tracepoint.hxfs_bit.hxfs_quota_defs.htrace/define_trace.h
Detected Declarations
struct xfs_rtgroupstruct xfs_scrubstruct xfilestruct xfarraystruct xfarray_sortinfostruct xchk_dqiterstruct xchk_iscanstruct xchk_nlinkstruct xchk_fscountersstruct xfs_rmap_update_paramsstruct xfs_parent_recstruct xchk_dirtreestruct xchk_dirtree_outcomesenum xchk_dirpath_outcome
Annotated Snippet
if (si->folio) {
__entry->folio_pos = folio_pos(si->folio);
__entry->folio_bytes = folio_size(si->folio);
__entry->first_idx = si->first_folio_idx;
__entry->last_idx = si->last_folio_idx;
} else {
__entry->folio_pos = 0;
__entry->folio_bytes = 0;
__entry->first_idx = 0;
__entry->last_idx = 0;
}
),
TP_printk("xfino 0x%lx nr %llu objsz %zu idx %llu folio_pos 0x%llx folio_bytes 0x%lx first_idx %llu last_idx %llu",
__entry->ino,
__entry->nr,
__entry->obj_size,
__entry->idx,
__entry->folio_pos,
__entry->folio_bytes,
__entry->first_idx,
__entry->last_idx)
);
TRACE_EVENT(xfarray_sort_stats,
TP_PROTO(struct xfarray_sortinfo *si, int error),
TP_ARGS(si, error),
TP_STRUCT__entry(
__field(unsigned long, ino)
#ifdef DEBUG
__field(unsigned long long, loads)
__field(unsigned long long, stores)
__field(unsigned long long, compares)
__field(unsigned long long, heapsorts)
#endif
__field(unsigned int, max_stack_depth)
__field(unsigned int, max_stack_used)
__field(int, error)
),
TP_fast_assign(
__entry->ino = file_inode(si->array->xfile->file)->i_ino;
#ifdef DEBUG
__entry->loads = si->loads;
__entry->stores = si->stores;
__entry->compares = si->compares;
__entry->heapsorts = si->heapsorts;
#endif
__entry->max_stack_depth = si->max_stack_depth;
__entry->max_stack_used = si->max_stack_used;
__entry->error = error;
),
TP_printk(
#ifdef DEBUG
"xfino 0x%lx loads %llu stores %llu compares %llu heapsorts %llu stack_depth %u/%u error %d",
#else
"xfino 0x%lx stack_depth %u/%u error %d",
#endif
__entry->ino,
#ifdef DEBUG
__entry->loads,
__entry->stores,
__entry->compares,
__entry->heapsorts,
#endif
__entry->max_stack_used,
__entry->max_stack_depth,
__entry->error)
);
#ifdef CONFIG_XFS_RT
TRACE_EVENT(xchk_rtsum_record_free,
TP_PROTO(struct xfs_mount *mp, xfs_rtxnum_t start,
xfs_rtbxlen_t len, unsigned int log, loff_t pos,
xfs_suminfo_t value),
TP_ARGS(mp, start, len, log, pos, value),
TP_STRUCT__entry(
__field(dev_t, dev)
__field(dev_t, rtdev)
__field(xfs_rtxnum_t, start)
__field(unsigned long long, len)
__field(unsigned int, log)
__field(loff_t, pos)
__field(xfs_suminfo_t, value)
),
TP_fast_assign(
__entry->dev = mp->m_super->s_dev;
__entry->rtdev = mp->m_rtdev_targp->bt_dev;
__entry->start = start;
__entry->len = len;
__entry->log = log;
__entry->pos = pos;
Annotation
- Immediate include surface: `linux/tracepoint.h`, `xfs_bit.h`, `xfs_quota_defs.h`, `trace/define_trace.h`.
- Detected declarations: `struct xfs_rtgroup`, `struct xfs_scrub`, `struct xfile`, `struct xfarray`, `struct xfarray_sortinfo`, `struct xchk_dqiter`, `struct xchk_iscan`, `struct xchk_nlink`, `struct xchk_fscounters`, `struct xfs_rmap_update_params`.
- Atlas domain: Core OS / VFS And Filesystem Core.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.