{
  "slug": "btrfs-tree-log",
  "term": "Btrfs tree log",
  "aliases": [
    "Btrfs log tree"
  ],
  "definition": "The Btrfs tree log is a per-subvolume recovery structure that can persist file or directory changes for fsync without a full filesystem transaction commit.",
  "note": "The Linux v6.16 fsync path can also fall back to a full commit. Mount-time replay can write even on a read-only mount. Upstream Linux 6.16 removed standalone nologreplay; rescue=nologreplay remains available and requires read-only mounting. Suppressing replay can hide recent logged changes, while btrfs rescue zero-log clears the log and may lose them. [fsync] [mount] [versions] [rescue]",
  "status": "shipping",
  "advantages": [],
  "limitations": [
    {
      "text": "A source-registration audit does not test actual recovery or distribution backports.",
      "citationIds": [
        "parser"
      ]
    },
    {
      "text": "notreelog and rescue=nologreplay control different flags; rescue=all additionally disables checksum checks.",
      "citationIds": [
        "parser"
      ]
    }
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-10-15",
  "related": [
    "btrfs",
    "copy-on-write",
    "fsync",
    "data-scrubbing"
  ],
  "citations": [
    {
      "id": "tree-log",
      "title": "Linux v6.16: Btrfs tree-log.c, design comment and replay implementation",
      "url": "https://github.com/torvalds/linux/blob/v6.16/fs/btrfs/tree-log.c",
      "accessed": "2026-10-15"
    },
    {
      "id": "fsync",
      "title": "Linux v6.16: Btrfs file.c, btrfs_sync_file and transaction-commit fallback",
      "url": "https://github.com/torvalds/linux/blob/v6.16/fs/btrfs/file.c",
      "accessed": "2026-10-15"
    },
    {
      "id": "mount",
      "title": "Btrfs documentation: btrfs(5), tree logging and rescue mount options",
      "url": "https://btrfs.readthedocs.io/en/latest/btrfs-man5.html",
      "accessed": "2026-10-15"
    },
    {
      "id": "versions",
      "title": "Btrfs feature-by-version: rescue in 5.9 and standalone nologreplay removal in 6.16",
      "url": "https://btrfs.readthedocs.io/en/latest/Feature-by-version.html",
      "accessed": "2026-10-15"
    },
    {
      "id": "parser",
      "title": "Linux v6.16: Btrfs super.c, option registration and read-only checks",
      "url": "https://github.com/torvalds/linux/blob/v6.16/fs/btrfs/super.c",
      "accessed": "2026-10-15"
    },
    {
      "id": "rescue",
      "title": "Btrfs documentation: btrfs-rescue(8), zero-log and possible loss of changes",
      "url": "https://btrfs.readthedocs.io/en/latest/btrfs-rescue.html",
      "accessed": "2026-10-15"
    },
    {
      "id": "hesela",
      "title": "Hesela: Btrfs tree logs, read-only replay and version boundaries",
      "url": "https://hesela.com/analyses/btrfs-tree-log-read-only-replay/",
      "accessed": "2026-10-15"
    }
  ]
}
