// SPDX-License-Identifier: GPL-2.0 /* * Copyright (c) 2000-2005 Silicon Graphics, Inc. * Copyright (c) 2013 Red Hat, Inc. * All Rights Reserved.
*/ #ifndef __XFS_SHARED_H__ #define __XFS_SHARED_H__
/* * Definitions shared between kernel and userspace that don't fit into any other * header file that is shared with userspace.
*/ struct xfs_ifork; struct xfs_buf; struct xfs_buf_ops; struct xfs_mount; struct xfs_trans; struct xfs_inode;
/* * Values for t_flags.
*/ /* Transaction needs to be logged */ #define XFS_TRANS_DIRTY (1u << 0) /* Superblock is dirty and needs to be logged */ #define XFS_TRANS_SB_DIRTY (1u << 1) /* Transaction took a permanent log reservation */ #define XFS_TRANS_PERM_LOG_RES (1u << 2) /* Synchronous transaction commit needed */ #define XFS_TRANS_SYNC (1u << 3) /* Transaction can use reserve block pool */ #define XFS_TRANS_RESERVE (1u << 4) /* Transaction should avoid VFS level superblock write accounting */ #define XFS_TRANS_NO_WRITECOUNT (1u << 5) /* Transaction has freed blocks returned to it's reservation */ #define XFS_TRANS_RES_FDBLKS (1u << 6) /* Transaction contains an intent done log item */ #define XFS_TRANS_HAS_INTENT_DONE (1u << 7) /* * LOWMODE is used by the allocator to activate the lowspace algorithm - when * free space is running low the extent allocator may choose to allocate an * extent from an AG without leaving sufficient space for a btree split when * inserting the new extent. In this case the allocator will enable the * lowspace algorithm which is supposed to allow further allocations (such as * btree splits and newroots) to allocate from sequential AGs. In order to * avoid locking AGs out of order the lowspace algorithm will start searching * for free space from AG 0. If the correct transaction reservations have been * made then this algorithm will eventually find all the space it needs.
*/ #define XFS_TRANS_LOWMODE (1u << 8)
/* Transaction has locked the rtbitmap and rtsum inodes */ #define XFS_TRANS_RTBITMAP_LOCKED (1u << 9)
/* * Here we centralize the specification of XFS meta-data buffer reference count * values. This determines how hard the buffer cache tries to hold onto the * buffer.
*/ #define XFS_AGF_REF 4 #define XFS_AGI_REF 4 #define XFS_AGFL_REF 3 #define XFS_INO_BTREE_REF 3 #define XFS_ALLOC_BTREE_REF 2 #define XFS_BMAP_BTREE_REF 2 #define XFS_RMAP_BTREE_REF 2 #define XFS_DIR_BTREE_REF 2 #define XFS_INO_REF 2 #define XFS_ATTR_BTREE_REF 1 #define XFS_DQUOT_REF 1 #define XFS_REFC_BTREE_REF 1 #define XFS_SSB_REF 0
/* Computed inode geometry for the filesystem. */ struct xfs_ino_geometry { /* Maximum inode count in this filesystem. */
uint64_t maxicount;
/* Actual inode cluster buffer size, in bytes. */ unsignedint inode_cluster_size;
/* * Desired inode cluster buffer size, in bytes. This value is not * rounded up to at least one filesystem block, which is necessary for * the sole purpose of validating sb_spino_align. Runtime code must * only ever use inode_cluster_size.
*/ unsignedint inode_cluster_size_raw;
/* Inode cluster sizes, adjusted to be at least 1 fsb. */ unsignedint inodes_per_cluster; unsignedint blocks_per_cluster;
/* Inode cluster alignment. */ unsignedint cluster_align; unsignedint cluster_align_inodes; unsignedint inoalign_mask; /* mask sb_inoalignmt if used */
unsignedint inobt_mxr[2]; /* max inobt btree records */ unsignedint inobt_mnr[2]; /* min inobt btree records */ unsignedint inobt_maxlevels; /* max inobt btree levels. */
/* Size of inode allocations under normal operation. */ unsignedint ialloc_inos; unsignedint ialloc_blks;
/* Minimum inode blocks for a sparse allocation. */ unsignedint ialloc_min_blks;
/* stripe unit inode alignment */ unsignedint ialloc_align;
unsignedint agino_log; /* #bits for agino in inum */
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.