The hole in my falloaction

This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).

Sparse files save disk space by storing only non-zero data blocks, with zero-filled regions recorded as metadata. When using fallocate() to reserve disk space, the allocated regions are marked as 'unwritten' by the filesystem, which lseek(SEEK_HOLE) treats as holes even though space is physically allocated. This optimization avoids unnecessary I/O by returning zeros directly without reading from disk. The ioctl(FS_IOC_FIEMAP) system call can distinguish between true sparse holes and unwritten allocated regions.

5m read timeFrom ayende.com
Post cover image

Sort: