fs/xfs/libxfs/xfs_alloc.h
Source file repositories/reference/linux-study-clean/fs/xfs/libxfs/xfs_alloc.h
File Facts
- System
- Linux kernel
- Corpus path
fs/xfs/libxfs/xfs_alloc.h- Extension
.h- Size
- 10254 bytes
- Lines
- 291
- 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_bufstruct xfs_btree_curstruct xfs_mountstruct xfs_peragstruct xfs_transstruct xfs_extent_free_itemstruct xfs_alloc_autoreapfunction xfs_free_extentfunction xfs_buf_to_agfl_bnofunction xfs_efi_is_realtime
Annotated Snippet
struct xfs_extent_free_item {
struct list_head xefi_list;
uint64_t xefi_owner;
xfs_fsblock_t xefi_startblock;/* starting fs block number */
xfs_extlen_t xefi_blockcount;/* number of blocks in extent */
struct xfs_group *xefi_group;
unsigned int xefi_flags;
enum xfs_ag_resv_type xefi_agresv;
};
#define XFS_EFI_SKIP_DISCARD (1U << 0) /* don't issue discard */
#define XFS_EFI_ATTR_FORK (1U << 1) /* freeing attr fork block */
#define XFS_EFI_BMBT_BLOCK (1U << 2) /* freeing bmap btree block */
#define XFS_EFI_CANCELLED (1U << 3) /* dont actually free the space */
#define XFS_EFI_REALTIME (1U << 4) /* freeing realtime extent */
static inline bool xfs_efi_is_realtime(const struct xfs_extent_free_item *xefi)
{
return xefi->xefi_flags & XFS_EFI_REALTIME;
}
struct xfs_alloc_autoreap {
struct xfs_defer_pending *dfp;
};
int xfs_alloc_schedule_autoreap(const struct xfs_alloc_arg *args,
unsigned int free_flags, struct xfs_alloc_autoreap *aarp);
void xfs_alloc_cancel_autoreap(struct xfs_trans *tp,
struct xfs_alloc_autoreap *aarp);
void xfs_alloc_commit_autoreap(struct xfs_trans *tp,
struct xfs_alloc_autoreap *aarp);
extern struct kmem_cache *xfs_extfree_item_cache;
int __init xfs_extfree_intent_init_cache(void);
void xfs_extfree_intent_destroy_cache(void);
xfs_failaddr_t xfs_validate_ag_length(struct xfs_buf *bp, uint32_t seqno,
uint32_t length);
#endif /* __XFS_ALLOC_H__ */
Annotation
- Detected declarations: `struct xfs_buf`, `struct xfs_btree_cur`, `struct xfs_mount`, `struct xfs_perag`, `struct xfs_trans`, `struct xfs_extent_free_item`, `struct xfs_alloc_autoreap`, `function xfs_free_extent`, `function xfs_buf_to_agfl_bno`, `function xfs_efi_is_realtime`.
- 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.