{
  "slug": "file-extent",
  "term": "File extent",
  "aliases": [
    "filesystem extent"
  ],
  "definition": "A filesystem mapping for a contiguous range of file blocks and the storage blocks backing that range.",
  "note": "Ext4 stores a starting file block, storage block and length for each extent, reducing mapping metadata for contiguous runs; this is a filesystem representation, not a statement about physical NAND placement. A FIEMAP mapping includes state flags, not just addresses; its synchronization option can change the state before reporting it. [ext4-extents] [fiemap-interface]\n\nShared storage: distinct files can map the same storage after a reflink. FIEMAP_EXTENT_SHARED reports that state but carries no reference count. Summing shared lengths across files can count storage repeatedly, and the flag alone cannot identify what deleting a chosen set will free. [fiemap-uapi] [shared-accounting]\n\nCopy granularity: coarse copy-on-write can copy unchanged data, while small copies can fragment later reads. FAST 2020 studied this trade-off in BetrFS 0.5 using buffered updates. Its historical HDD evaluation does not establish a current SSD performance ranking. [zhan20]",
  "status": "shipping",
  "advantages": [],
  "limitations": [],
  "related": [
    "unwritten-extent",
    "sparse-file",
    "file-preallocation",
    "reflink",
    "fiemap",
    "filesystem-block"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-21",
  "citations": [
    {
      "id": "ext4-extents",
      "title": "Linux 6.12: ext4 extent tree and mapping format",
      "url": "https://docs.kernel.org/6.12/filesystems/ext4/dynamic.html#extent-tree",
      "accessed": "2026-10-13"
    },
    {
      "id": "hesela-allocation",
      "title": "Sparse files, preallocation and thin-pool capacity",
      "url": "https://hesela.com/analyses/sparse-files-preallocation-thin-capacity/",
      "accessed": "2026-10-13"
    },
    {
      "id": "fiemap-interface",
      "title": "Linux 6.12: FIEMAP ioctl, flags and access restrictions",
      "url": "https://docs.kernel.org/6.12/filesystems/fiemap.html",
      "accessed": "2026-10-16"
    },
    {
      "id": "fiemap-uapi",
      "title": "Linux v6.12: FIEMAP extent structure and shared-storage result bit",
      "url": "https://raw.githubusercontent.com/torvalds/linux/v6.12/include/uapi/linux/fiemap.h",
      "accessed": "2026-11-21"
    },
    {
      "id": "shared-accounting",
      "title": "Btrfs-progs v6.16: per-set FIEMAP extent accounting",
      "url": "https://raw.githubusercontent.com/kdave/btrfs-progs/v6.16/Documentation/btrfs-filesystem.rst",
      "accessed": "2026-11-21"
    },
    {
      "id": "zhan20",
      "title": "Zhan et al., How to Copy Files, FAST 2020, sections 1 and 5.1",
      "url": "https://www.usenix.org/conference/fast20/presentation/zhan",
      "accessed": "2026-11-21"
    }
  ],
  "provenance": [
    "The FAST 2020 paper was read beyond its abstract, including the clone design and evaluation method. This entry reports a mechanism, not a reproduced benchmark.",
    "The paper evaluates BetrFS on a modified Linux 3.11.10 kernel and other filesystems on 4.9.142, using a 7200 RPM SATA disk."
  ]
}
