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.

Dependency Surface

Detected Declarations

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

Implementation Notes