Bug 1565004 - RFE: support reflink clones on XFS
Summary: RFE: support reflink clones on XFS
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-09 06:39 UTC by slurm.tab
Modified: 2018-07-06 14:58 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-07-06 14:58:24 UTC
Embargoed:


Attachments (Terms of Use)

Description slurm.tab 2018-04-09 06:39:59 UTC
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

Comment 1 Michal Privoznik 2018-07-06 14:58:24 UTC
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


Note You need to log in before you can comment on or make changes to this bug.