fs/xfs/xfs_mount.h
Source file repositories/reference/linux-study-clean/fs/xfs/xfs_mount.h
File Facts
- System
- Linux kernel
- Corpus path
fs/xfs/xfs_mount.h- Extension
.h- Size
- 28225 bytes
- Lines
- 827
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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 xlogstruct xfs_inodestruct xfs_mru_cachestruct xfs_ailstruct xfs_quotainfostruct xfs_da_geometrystruct xfs_peragstruct xfs_healthmonstruct xfs_error_cfgstruct xfs_inodegcstruct xfs_groupsstruct xfs_freecounterfunction xfs_has_rtgroupsfunction xfs_has_rtsbfunction xfs_has_rtrmapbtfunction xfs_has_rtreflinkfunction xfs_has_nonzonedfunction xfs_can_sw_atomic_writefunction xfs_add_attr2function xfs_is_quotacheck_runningfunction xfs_is_resuming_quotaonfunction xfs_set_resuming_quotaonfunction xfs_should_warnfunction xfs_daddr_to_agnofunction xfs_daddr_to_agbnofunction xfs_sum_freecounterfunction xfs_sum_freecounter_rawfunction xfs_estimate_freecounterfunction xfs_compare_freecounterfunction xfs_set_freecounterfunction xfs_dec_fdblocksfunction xfs_add_fdblocksfunction xfs_dec_frextentsfunction xfs_add_frextentsfunction xfs_mod_sb_delallocfunction xfs_group_type_buftarg
Annotated Snippet
struct xfs_error_cfg {
struct xfs_kobj kobj;
int max_retries;
long retry_timeout; /* in jiffies, -1 = infinite */
};
/*
* Per-cpu deferred inode inactivation GC lists.
*/
struct xfs_inodegc {
struct xfs_mount *mp;
struct llist_head list;
struct delayed_work work;
int error;
/* approximate count of inodes in the list */
unsigned int items;
unsigned int shrinker_hits;
unsigned int cpu;
};
/*
* Container for each type of groups, used to look up individual groups and
* describes the geometry.
*/
struct xfs_groups {
struct xarray xa;
/*
* Maximum capacity of the group in FSBs.
*
* Each group is laid out densely in the daddr space. For the
* degenerate case of a pre-rtgroups filesystem, the incore rtgroup
* pretends to have a zero-block and zero-blklog rtgroup.
*/
uint32_t blocks;
/*
* Log(2) of the logical size of each group.
*
* Compared to the blocks field above this is rounded up to the next
* power of two, and thus lays out the xfs_fsblock_t/xfs_rtblock_t
* space sparsely with a hole from blocks to (1 << blklog) at the end
* of each group.
*/
uint8_t blklog;
/*
* Zoned devices can have gaps beyond the usable capacity of a zone and
* the end in the LBA/daddr address space. In other words, the hardware
* equivalent to the RT groups already takes care of the power of 2
* alignment for us. In this case the sparse FSB/RTB address space maps
* 1:1 to the device address space.
*/
bool has_daddr_gaps;
/*
* Mask to extract the group-relative block number from a FSB.
* For a pre-rtgroups filesystem we pretend to have one very large
* rtgroup, so this mask must be 64-bit.
*/
uint64_t blkmask;
/*
* Start of the first group in the device. This is used to support a
* RT device following the data device on the same block device for
* SMR hard drives.
*/
xfs_fsblock_t start_fsb;
/*
* Maximum length of an atomic write for files stored in this
* collection of allocation groups, in fsblocks.
*/
xfs_extlen_t awu_max;
};
struct xfs_freecounter {
/* free blocks for general use: */
struct percpu_counter count;
/* total reserved blocks: */
uint64_t res_total;
/* available reserved blocks: */
uint64_t res_avail;
/* reserved blks @ remount,ro: */
uint64_t res_saved;
};
Annotation
- Detected declarations: `struct xlog`, `struct xfs_inode`, `struct xfs_mru_cache`, `struct xfs_ail`, `struct xfs_quotainfo`, `struct xfs_da_geometry`, `struct xfs_perag`, `struct xfs_healthmon`, `struct xfs_error_cfg`, `struct xfs_inodegc`.
- Atlas domain: Core OS / VFS And Filesystem Core.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.