Gregwar/fatcat

Support for FALLOC_FL_PUNCH_HOLE

rowlap opened this issue · 0 comments

fatcat's -z mode is great for backups of FAT filesystems, in order to make them more compressible.

Would there be any interest in adding fallocate support for making holes in the file for similar space-saving purposes? I've hacked around a proof of concept which seems to work.

This would be functionally similar to defragging / compacting then shrinking the filesystem, except when done right, no undeleted data is touched.

(Why do this? I have backups of filesystems with low %age use, but prefer to keep them in the exact backup file which dd copies. It would save gigs of space to be able to make the files sparse.)