Allocation bitmap
An allocation bitmap encodes the allocation state of storage units as bits.
The unit depends on the format: ext4 has inode and block-allocation bitmaps, but bigalloc makes each block-bitmap bit represent a cluster of multiple blocks. ExFAT uses cluster allocation bits. Ext4's uninitialized-group handling also means a raw bitmap need not be interpreted without its metadata context. [1] [5] [4]
Linux v6.12's exFAT implementation searches bitmap bits for free clusters and counts set bits for used-cluster accounting. Neither operation traverses a file's ordered chain. When freeing a cluster, clearing its bit and automatically issuing discard are separate steps; this discard depends on the mount option. The separate trim operation can also issue discard. [2]
Relations
Limitations
- A space map alone cannot identify which file owns a unit or reconstruct the order of its contents. [2, 3]
Citations
- Linux kernel documentation: ext4 block and inode bitmaps
- Linux v6.12: exFAT allocation bitmap operations, fs/exfat/balloc.c
- Linux v6.12: exFAT chain traversal and allocation, fs/exfat/fatent.c
- Microsoft exFAT specification: sections 3.1.10, 6.3.4.2, 7.1 and 7.6
- Linux kernel documentation: ext4 bigalloc and clustered allocation