Skip to main content

SPARSE_HOLE_RATIO_SKIP_THRESHOLD

Constant SPARSE_HOLE_RATIO_SKIP_THRESHOLD 

Source
pub const SPARSE_HOLE_RATIO_SKIP_THRESHOLD: f64 = 0.5;
Expand description

When a file’s hole ratio (bytes in holes / total bytes) exceeds this threshold, skip fallocate pre-allocation. The io_uring pipeline will punch holes as needed. This avoids the wasteful allocate-then-punch round-trip for borderline-sparse files.