fs/xfs/xfs_extfree_item.h

Source file repositories/reference/linux-study-clean/fs/xfs/xfs_extfree_item.h

File Facts

System
Linux kernel
Corpus path
fs/xfs/xfs_extfree_item.h
Extension
.h
Size
3208 bytes
Lines
101
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_efi_log_item {
	struct xfs_log_item	efi_item;
	atomic_t		efi_refcount;
	atomic_t		efi_next_extent;
	struct xfs_efi_log_format efi_format;
};

static inline size_t
xfs_efi_log_item_sizeof(
	unsigned int		nr)
{
	return offsetof(struct xfs_efi_log_item, efi_format) +
			xfs_efi_log_format_sizeof(nr);
}

/*
 * This is the "extent free done" log item.  It is used to log
 * the fact that some extents earlier mentioned in an efi item
 * have been freed.
 */
struct xfs_efd_log_item {
	struct xfs_log_item	efd_item;
	struct xfs_efi_log_item *efd_efip;
	uint			efd_next_extent;
	struct xfs_efd_log_format efd_format;
};

static inline size_t
xfs_efd_log_item_sizeof(
	unsigned int		nr)
{
	return offsetof(struct xfs_efd_log_item, efd_format) +
			xfs_efd_log_format_sizeof(nr);
}

/*
 * Max number of extents in fast allocation path.
 */
#define	XFS_EFD_MAX_FAST_EXTENTS	16

extern struct kmem_cache	*xfs_efi_cache;
extern struct kmem_cache	*xfs_efd_cache;

struct xfs_extent_free_item;

void xfs_extent_free_defer_add(struct xfs_trans *tp,
		struct xfs_extent_free_item *xefi,
		struct xfs_defer_pending **dfpp);

unsigned int xfs_efi_log_space(unsigned int nr);
unsigned int xfs_efd_log_space(unsigned int nr);

#endif	/* __XFS_EXTFREE_ITEM_H__ */

Annotation

Implementation Notes