fs/xfs/libxfs/xfs_zones.h
Source file repositories/reference/linux-study-clean/fs/xfs/libxfs/xfs_zones.h
File Facts
- System
- Linux kernel
- Corpus path
fs/xfs/libxfs/xfs_zones.h- Extension
.h- Size
- 1565 bytes
- Lines
- 45
- 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 xfs_rtgroupstruct blk_zone
Annotated Snippet
#ifndef _LIBXFS_ZONES_H
#define _LIBXFS_ZONES_H
struct xfs_rtgroup;
struct blk_zone;
/*
* In order to guarantee forward progress for GC we need to reserve at least
* two zones: one that will be used for moving data into and one spare zone
* making sure that we have enough space to relocate a nearly-full zone.
* To allow for slightly sloppy accounting for when we need to reserve the
* second zone, we actually reserve three as that is easier than doing fully
* accurate bookkeeping.
*/
#define XFS_GC_ZONES 3U
/*
* In addition we need two zones for user writes, one open zone for writing
* and one to still have available blocks without resetting the open zone
* when data in the open zone has been freed.
*/
#define XFS_RESERVED_ZONES (XFS_GC_ZONES + 1)
#define XFS_MIN_ZONES (XFS_RESERVED_ZONES + 1)
/*
* Always keep one zone out of the general open zone pool to allow for GC to
* happen while other writers are waiting for free space.
*/
#define XFS_OPEN_GC_ZONES 1U
#define XFS_MIN_OPEN_ZONES (XFS_OPEN_GC_ZONES + 1U)
/*
* For zoned devices that do not have a limit on the number of open zones, and
* for regular devices using the zoned allocator, use the most common SMR disks
* limit (128) as the default limit on the number of open zones.
*/
#define XFS_DEFAULT_MAX_OPEN_ZONES 128
bool xfs_validate_blk_zone(struct xfs_mount *mp, struct blk_zone *zone,
unsigned int zone_no, uint32_t expected_size,
uint32_t expected_capacity, xfs_rgblock_t *write_pointer);
#endif /* _LIBXFS_ZONES_H */
Annotation
- Detected declarations: `struct xfs_rtgroup`, `struct blk_zone`.
- 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.