btrfs supports reflinks, XFS supports reflinks (since 2017 I think?).
Are there any other filesystems that support it?
truncate -s 1G test.file;
cp --reflink=always test.file ref.test.file;
btrfs supports reflinks, XFS supports reflinks (since 2017 I think?).
Are there any other filesystems that support it?
truncate -s 1G test.file;
cp --reflink=always test.file ref.test.file;
Support for reflinks is indicated using the remap_file_range operation, which is currently (6.7) supported by bcachefs, Btrfs, CIFS, NFS 4.2, OCFS2, overlayfs, and XFS.
truncatedoesn't write or even pre-allocate the file, it just sets the length, so you have a purely sparse file with a non-zero length but no data extents. – Peter Cordes Mar 14 '23 at 17:55