FAT cluster chain
A FAT cluster chain represents an allocation as an ordered sequence of cluster links ending in an end-of-chain marker.
In Linux v6.12's exFAT code, chain traversal follows each FAT entry to the next cluster. A separate helper can create links between consecutive clusters, so the existence of a chain does not establish fragmentation. [1]
A synthetic ordering example: 20, 21, 22 and 20, 22, 21 occupy the same cluster set but order the file differently. Counting consecutive forward runs yields one and three, respectively. These are volume-cluster runs, not physical NAND locations or device-request counts.
FAT32's FSInfo keeps a free-cluster count separately from its allocation links. An unknown sentinel requests recomputation; an ordinary in-range value can still be stale. The next-cluster field is a search hint, not proof that the target is free. These FAT32 fields must not be inferred from exFAT's different allocation structures. [2]
In Hesela's controlled FatFs R0.16 image test, trusting stale zero/one counts limited a 1536-byte write to 0/512 bytes with FR_OK. The full-scan policy completed both writes. This is a designed ordinary-file experiment, not a Linux-driver or physical-card result. [3]
Relations
- related
- exFAT, Allocation bitmap, Filesystem aging, Free-space fragmentation, statvfs, FAT long filename
Citations
- Linux v6.12: exFAT chain traversal and allocation, fs/exfat/fatent.c
- Microsoft FAT specification v1.03 (2000): FSInfo sector, pp. 21-22
- Hesela: FatFs R0.16 FSInfo experiment, original captures and reproduction instructions
Sources & caveats
- The numeric sequences illustrate ordering only; they are not a complete volume image, measured workload or Linux allocator trace.