File preallocation
Reserving filesystem allocation for a file range before the application writes that range's data.
Successful Linux fallocate with mode 0 protects subsequent writes in the allocated range against lack of filesystem space; KEEP_SIZE avoids extending logical length. This is not just an advisory hint. A lower thin pool can still require backing allocations when data is written: an end-to-end capacity reservation is not established by the file operation alone, an inference from the separate layer contracts. Shared extents need an explicit sharing-aware contract; FALLOC_FL_UNSHARE_RANGE can make them private where supported.
Relations
- related
- sparse-file, hole-punching, thin-provisioning, fsync, file-extent, unwritten-extent, reflink
Advantages
- Reserves a selected range before later application writes need its filesystem allocation. [1]
Limitations
- Allocation is not proof that future application data has been persisted. [2]
- The fallocate interface also has deallocation and zeroing modes, so the API name alone does not identify preallocation. [1]