{
  "status": "shipping",
  "advantages": [
    {
      "text": "A file can be extended by raising DataLength and allocating clusters without first writing zeros to the new tail.",
      "citationIds": [
        "exfat-spec"
      ]
    }
  ],
  "limitations": [
    {
      "text": "Bytes left from earlier use can remain on the medium past ValidDataLength, where tools that bypass the filesystem can read them.",
      "citationIds": [
        "exfat-spec"
      ]
    },
    {
      "text": "Memory-mapped writes do not pass through exfat_write_end, so the v6.12 code lowers valid_size to the on-disk size when it writes the directory entry back.",
      "citationIds": [
        "linux-inode"
      ]
    }
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-10-23",
  "slug": "exfat-valid-data-length",
  "term": "ValidDataLength (exFAT)",
  "aliases": [
    "exFAT VDL"
  ],
  "definition": "ValidDataLength is the exFAT stream field that records the initialized prefix length in bytes.",
  "note": "ValidDataLength and DataLength are 8-byte fields at offsets 8 and 24 of the 32-byte Stream Extension directory entry. For a regular file, VDL lies between zero and DataLength. Reads in the remaining logical tail return zeros although its on-media bytes are undefined. This differs from allocation size and does not demonstrate erasure. Directories require both lengths to match, with a directory limit of 256 MB. [exfat-spec]\n\nKernel source at tag v6.12 distinguishes the partially initialized block from later unwritten blocks in exfat_get_block. Readahead that crosses the valid boundary falls back to page-by-page reads, and exfat_direct_IO zeroes the returned bytes past valid_size in a partially written block. This is version-specific code evidence, not a mounted-volume experiment. [linux-inode]",
  "related": [
    "exfat",
    "allocation-bitmap",
    "file-storage",
    "posix-fallocate"
  ],
  "citations": [
    {
      "id": "exfat-spec",
      "title": "Microsoft exFAT 1.00 specification: section 7.6.5, ValidDataLength",
      "url": "https://learn.microsoft.com/en-us/windows/win32/fileio/exfat-specification#765-validdatalength-field",
      "accessed": "2026-10-23"
    },
    {
      "id": "linux-inode",
      "title": "Linux v6.12: exfat_get_block and exfat_direct_IO, fs/exfat/inode.c",
      "url": "https://github.com/torvalds/linux/blob/v6.12/fs/exfat/inode.c",
      "accessed": "2026-10-23"
    }
  ],
  "provenance": [
    "exfat-spec re-read 2026-10-23 for the Stream Extension field table, section 7.6.5 and the 256 MB directory limit.",
    "linux-inode re-read 2026-10-23 as fs/exfat/inode.c at tag v6.12 from the kernel.org plain-text copy, for exfat_get_block, exfat_readahead, exfat_direct_IO and the valid_size fixup.",
    "The posix-fallocate entry links here because both reserve file space for a byte range without writing data into it, and this field records how much of such an allocation holds written data."
  ]
}
