{
  "slug": "xfs",
  "term": "XFS",
  "aliases": [
    "XFS filesystem"
  ],
  "definition": "XFS is an extent-based journaling filesystem that divides its data section into allocation groups and uses B-trees for filesystem metadata.",
  "note": "XFS originated on SGI IRIX and is also implemented in Linux. Its data section is divided into allocation groups to support parallel allocation work. It has a log section and can have a separate realtime section; the log may be internal or on another device. Allocation groups are parts of one filesystem, not independent recovery copies. [overview] [manual]\n\nXFS journals metadata through write-ahead logging. In the Linux v6.16 design, delayed logging combines repeated metadata changes before writing a checkpoint. An in-memory transaction commit can therefore precede persistence in the journal. Ordinary file-data writes are distinct from these metadata transactions. [logging]\n\nFor application durability, use a synchronization protocol and check its results; synchronizing a file alone does not guarantee persistence of its containing directory entry. The recovery machinery can replay recorded changes and finish work described by intent records, but a chain of rolling transactions is not one atomic journal transaction. Follow the related logging records for those internal boundaries. [fsync] [logging]\n\nWith metadata CRCs enabled, self-describing metadata combines CRC32c with filesystem identity, block location and object-specific ownership. A matching CRC alone does not detect a byte-identical block written to the wrong location; identity checks supply that context. These metadata checks are not file-content checksums or a proof of all cross-block relationships. [metadata] [mkfs]",
  "status": "shipping",
  "advantages": [],
  "limitations": [
    {
      "text": "A read-only mount can still perform internal log-recovery writes. The norecovery option requires read-only mounting and suppresses recovery; after an unclean shutdown this can expose inconsistent state and inaccessible files or directories.",
      "citationIds": [
        "log-writes",
        "manual"
      ]
    }
  ],
  "related": [
    "xfs-ail",
    "xfs-cil",
    "xfs-deferred-operation",
    "xfs-delayed-logging",
    "xfs-intent-log-item",
    "xfs-relogging",
    "xfs-rolling-transaction",
    "inode",
    "file-extent",
    "delayed-allocation",
    "write-ahead-log",
    "fsync",
    "checksum",
    "filesystem-consistency-invariant",
    "read-only-mount"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-10-24",
  "citations": [
    {
      "id": "overview",
      "title": "Linux v6.16: XFS overview, extents, B-trees and filesystem sections",
      "url": "https://github.com/torvalds/linux/blob/v6.16/Documentation/admin-guide/xfs.rst",
      "accessed": "2026-10-24"
    },
    {
      "id": "manual",
      "title": "xfsprogs xfs(5): data, log and realtime sections; allocation groups",
      "url": "https://man7.org/linux/man-pages/man5/xfs.5.html",
      "accessed": "2026-10-24"
    },
    {
      "id": "logging",
      "title": "Linux v6.16: XFS Logging Design, metadata transactions and asynchronous commits",
      "url": "https://github.com/torvalds/linux/blob/v6.16/Documentation/filesystems/xfs/xfs-delayed-logging-design.rst",
      "accessed": "2026-10-24"
    },
    {
      "id": "fsync",
      "title": "Linux man-pages fsync(2): file and directory synchronization",
      "url": "https://man7.org/linux/man-pages/man2/fsync.2.html",
      "accessed": "2026-10-24"
    },
    {
      "id": "metadata",
      "title": "Linux v6.16: XFS Self Describing Metadata, location, ownership and runtime validation",
      "url": "https://www.kernel.org/doc/html/v6.16/filesystems/xfs/xfs-self-describing-metadata.html",
      "accessed": "2026-10-24"
    },
    {
      "id": "mkfs",
      "title": "xfsprogs mkfs.xfs(8): metadata crc option",
      "url": "https://man7.org/linux/man-pages/man8/mkfs.xfs.8.html",
      "accessed": "2026-10-24"
    },
    {
      "id": "log-writes",
      "title": "Linux v6.16: xfs_log_writable permits internal recovery writes on read-only mounts",
      "url": "https://github.com/torvalds/linux/blob/v6.16/fs/xfs/xfs_log.c#L317-L335",
      "accessed": "2026-10-24"
    }
  ],
  "provenance": [
    "Foundational source review of xfsprogs documentation and Linux v6.16 design; no universal workload ranking or benchmark result is asserted."
  ]
}
