fs/xfs/scrub/rtbitmap.h
Source file repositories/reference/linux-study-clean/fs/xfs/scrub/rtbitmap.h
File Facts
- System
- Linux kernel
- Corpus path
fs/xfs/scrub/rtbitmap.h- Extension
.h- Size
- 2182 bytes
- Lines
- 78
- 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_rtbitmapfunction xchk_rtbitmap_wordcnt
Annotated Snippet
struct xchk_rtbitmap {
struct xfs_scrub *sc;
uint64_t rextents;
uint64_t rbmblocks;
unsigned int rextslog;
unsigned int resblks;
/* The next free rt group block number that we expect to see. */
xfs_rgblock_t next_free_rgbno;
#ifdef CONFIG_XFS_ONLINE_REPAIR
/* stuff for staging a new bitmap */
struct xfs_rtalloc_args args;
struct xrep_tempexch tempexch;
#endif
/* The next rtgroup block we expect to see during our rtrmapbt walk. */
xfs_rgblock_t next_rgbno;
/* rtgroup lock flags */
unsigned int rtglock_flags;
/* rtword position of xfile as we write buffers to disk. */
xrep_wordoff_t prep_wordoff;
/* In-Memory rtbitmap for repair. */
union xfs_rtword_raw words[];
};
#ifdef CONFIG_XFS_ONLINE_REPAIR
int xrep_setup_rtbitmap(struct xfs_scrub *sc, struct xchk_rtbitmap *rtb);
/*
* How big should the words[] buffer be?
*
* For repairs, we want a full fsblock worth of space so that we can memcpy a
* buffer full of 1s into the xfile bitmap. The xfile bitmap doesn't have
* rtbitmap block headers, so we don't use blockwsize. Scrub doesn't use the
* words buffer at all.
*/
static inline unsigned int
xchk_rtbitmap_wordcnt(
struct xfs_scrub *sc)
{
if (xchk_could_repair(sc))
return sc->mp->m_sb.sb_blocksize >> XFS_WORDLOG;
return 0;
}
#else
# define xrep_setup_rtbitmap(sc, rtb) (0)
# define xchk_rtbitmap_wordcnt(sc) (0)
#endif /* CONFIG_XFS_ONLINE_REPAIR */
#endif /* __XFS_SCRUB_RTBITMAP_H__ */
Annotation
- Detected declarations: `struct xchk_rtbitmap`, `function xchk_rtbitmap_wordcnt`.
- 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.