{
  "slug": "unwritten-extent",
  "term": "Unwritten extent",
  "aliases": [
    "uninitialized extent"
  ],
  "definition": "An allocated filesystem extent whose data is not initialized and is exposed as zeros when read through the filesystem.",
  "note": "Unlike a hole it has allocation; unlike delayed allocation it has assigned storage. FIEMAP marks this state UNWRITTEN; direct-device contents are undefined, so filesystem zero reads do not establish device contents or sanitization. FIEMAP DELALLOC implies UNKNOWN, but UNKNOWN alone does not identify delayed allocation.\n\nA three-file Hesela observation on ext4 found identical zero readback before and after allocation changes; this is a scoped example, not a universal physical-space measurement.\n\nThe allocation distinction does not mean SEEK_HOLE must exclude this extent: in a controlled ext4 test, a read changed seek classification while allocation and logical FIEMAP descriptors remained unchanged. Preserving the source bytes in a copy does not necessarily preserve its preallocation.",
  "status": "shipping",
  "advantages": [],
  "limitations": [
    {
      "text": "Seek classification depends on filesystem behavior and can reflect page-cache state; it is not an exact allocation map.",
      "citationIds": [
        "seek-iomap",
        "seek-filemap",
        "hesela-seek-observation"
      ]
    }
  ],
  "related": [
    "file-extent",
    "fiemap",
    "file-preallocation",
    "sparse-file",
    "hole-punching",
    "delayed-allocation"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-10-20",
  "citations": [
    {
      "id": "fiemap",
      "title": "Linux 6.12: FIEMAP extent states and access restrictions",
      "url": "https://docs.kernel.org/6.12/filesystems/fiemap.html",
      "accessed": "2026-10-16"
    },
    {
      "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": "hesela-observation",
      "title": "Hesela: three-run ext4 allocation observation, source hashes and environment",
      "url": "https://hesela.dev/research/allocation-observation.json",
      "accessed": "2026-10-16"
    },
    {
      "id": "seek-iomap",
      "title": "Linux v6.8 iomap seek handling of unwritten extents",
      "url": "https://github.com/torvalds/linux/blob/v6.8/fs/iomap/seek.c",
      "accessed": "2026-10-20"
    },
    {
      "id": "seek-filemap",
      "title": "Linux v6.8 page-cache seek classification",
      "url": "https://github.com/torvalds/linux/blob/v6.8/mm/filemap.c",
      "accessed": "2026-10-20"
    },
    {
      "id": "cp-implementation",
      "title": "GNU coreutils v9.4 copy.c: sparse heuristic and copy paths",
      "url": "https://github.com/coreutils/coreutils/blob/v9.4/src/copy.c",
      "accessed": "2026-10-20"
    },
    {
      "id": "hesela-seek-observation",
      "title": "Hesela: recorded sparse-copy observations and versioned method",
      "url": "https://hesela.dev/research/seek-hole-observer/README.md",
      "accessed": "2026-10-20"
    }
  ],
  "provenance": [
    "Sparse-copy supplement: one host, Linux 6.8.0-146-generic, ext4/tmpfs and GNU cp 9.4-3ubuntu6.3. This is a file-level observation, not a crash, capacity-exhaustion or device-traffic test."
  ]
}
