XFS now supports reflink feature similar to btrfs, i.e. cp --reflink=auto can create instantly create CoW file clone on a reflink-enabled XFS filesystem. It would be nice to see support for it in libvirt when cloning storage. Previously support for btrfs reflinks was added in https://bugzilla.redhat.com/show_bug.cgi?id=631909 but the implementation seems not universal and only works for btrfs
Pushed upstream: commit 8ed874b39b3c330bbcdff434e08995dbb4467285 Author: Julio Faracco <jcfaracco> AuthorDate: Fri Jul 6 10:43:01 2018 -0300 Commit: Michal Privoznik <mprivozn> CommitDate: Fri Jul 6 16:56:56 2018 +0200 storage: Rename btrfsCloneFile to support other filesystems. This commit renames and adds other macros to support aother filesystems when a reflink is performed. After that, XFS filesystems (and others) with reflink support will be able to clone. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1565004 Signed-off-by: Julio Faracco <jcfaracco> Signed-off-by: Michal Privoznik <mprivozn> commit 2e11298f938672c5430193277c98b9474a68b1fb Author: Julio Faracco <jcfaracco> AuthorDate: Fri Jul 6 10:43:00 2018 -0300 Commit: Michal Privoznik <mprivozn> CommitDate: Fri Jul 6 16:56:55 2018 +0200 configure: Adding XFS library/headers check. This commit checks for xfs.h library to use XFS_IOC_CLONE which is defined into that library file. So, after that it is possible to use thie macro to create reflinks. Signed-off-by: Julio Faracco <jcfaracco> v4.5.0-50-g8ed874b39b