Skip to content

SystemTools: CopyFileAlways: try to create a cheap CoW clone first

Gregor Jasny requested to merge gjasny/kwsys:copy-reflink into master

Some Linux file systems like XFS and BTRFS support creating copy-on-write file clones. They share all the advantages of hard links but not their disadvantages like the shared inode. See xfs-reflinks-and-deduplication.

This patch implements the same ioctl like cp --reflink=auto uses and falls back to blockwise copy.

In or project it reduces CMake install time from 56 to 24 seconds and also does not allocate any extra space for the installed data.

Merge request reports