fs/xfs/scrub/btree.h
Source file repositories/reference/linux-study-clean/fs/xfs/scrub/btree.h
File Facts
- System
- Linux kernel
- Corpus path
fs/xfs/scrub/btree.h- Extension
.h- Size
- 1922 bytes
- Lines
- 71
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct xchk_btreestruct xchk_btree_keystruct xchk_btreefunction xchk_btree_sizeof
Annotated Snippet
struct xchk_btree_key {
union xfs_btree_key key;
bool valid;
};
struct xchk_btree {
/* caller-provided scrub state */
struct xfs_scrub *sc;
struct xfs_btree_cur *cur;
xchk_btree_rec_fn scrub_rec;
const struct xfs_owner_info *oinfo;
void *private;
/* internal scrub state */
bool lastrec_valid;
union xfs_btree_rec lastrec;
struct list_head to_check;
/* this element must come last! */
struct xchk_btree_key lastkey[];
};
/*
* Calculate the size of a xchk_btree structure. There are nlevels-1 slots for
* keys because we track leaf records separately in lastrec.
*/
static inline size_t
xchk_btree_sizeof(unsigned int nlevels)
{
return struct_size_t(struct xchk_btree, lastkey, nlevels - 1);
}
int xchk_btree(struct xfs_scrub *sc, struct xfs_btree_cur *cur,
xchk_btree_rec_fn scrub_fn, const struct xfs_owner_info *oinfo,
void *private);
#endif /* __XFS_SCRUB_BTREE_H__ */
Annotation
- Detected declarations: `struct xchk_btree`, `struct xchk_btree_key`, `struct xchk_btree`, `function xchk_btree_sizeof`.
- 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.