{
  "slug": "xfs-allocation-group",
  "term": "XFS allocation group",
  "aliases": [
    "XFS AG"
  ],
  "definition": "An XFS allocation group is a region of the filesystem data section with its own free-space and inode allocation metadata.",
  "note": "Allocation groups let allocation work proceed in parallel within one filesystem. They are not separate filesystems or replicated copies, and their boundaries do not themselves provide hardware fault isolation. A higher group count is not a universal speedup: allocation overhead can rise, especially near full capacity. [manual]\n\nLayout: fixed-location structures include the superblock, AGF, AGI and AGFL; their headers lead to the group's allocation indexes. Most other metadata is dynamically placed. Free-space-tree ownership is identified by allocation group, unlike extent-tree ownership by inode. [manual] [metadata]\n\nThe AGFL is a reserve of blocks for the free-space and reverse-mapping B-trees, not a list of all free extents. Those trees also use XFS_RMAP_OWN_AG ownership. An ownership record alone therefore does not distinguish a block still on the reserve list from one already used by these indexes. [design]\n\nObservation: an AG header lock protects a stage of metadata work, not an entire chain of deferred operations. For AG-wide cross-checks, Linux v6.16 tests for pending intents and can drop locks, wait and retry. Inode-oriented checking has a separate lock-based path. A transient mismatch between indexes must not automatically be classified as persistent corruption. [scrub] [design]",
  "status": "shipping",
  "advantages": [],
  "limitations": [],
  "related": [
    "xfs",
    "inode",
    "xfs-deferred-operation"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-30",
  "citations": [
    {
      "id": "manual",
      "title": "xfsprogs xfs(5): allocation groups, local indexes and allocation parallelism",
      "url": "https://man7.org/linux/man-pages/man5/xfs.5.html",
      "accessed": "2026-11-30"
    },
    {
      "id": "metadata",
      "title": "Linux v6.16: XFS self-describing metadata, fixed headers and ownership",
      "url": "https://raw.githubusercontent.com/torvalds/linux/v6.16/Documentation/filesystems/xfs/xfs-self-describing-metadata.rst",
      "accessed": "2026-11-30"
    },
    {
      "id": "scrub",
      "title": "Linux v6.16: xchk_perag_drain_and_lock, pending intents and inode-lock exception",
      "url": "https://raw.githubusercontent.com/torvalds/linux/v6.16/fs/xfs/scrub/common.c",
      "accessed": "2026-11-30"
    },
    {
      "id": "design",
      "title": "Linux v6.16: XFS Online Fsck Design, eventual consistency and intent drains",
      "url": "https://raw.githubusercontent.com/torvalds/linux/v6.16/Documentation/filesystems/xfs/xfs-online-fsck-design.rst",
      "accessed": "2026-11-30"
    }
  ],
  "provenance": [
    "Source synthesis covering ordinary data-section allocation groups, not realtime groups or zoned-XFS garbage collection.",
    "The isolation distinction follows the filesystem layout; no hardware-failure or allocation-performance experiment was performed."
  ]
}
