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.

Dependency Surface

Detected Declarations

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

Implementation Notes