Bug 12785 - vfs_default should support file clones with IOC_CLONE_RANGE
vfs_default should support file clones with IOC_CLONE_RANGE
Status: NEW
Product: Samba 4.1 and newer
Classification: Unclassified
Component: VFS Modules
unspecified
All All
: P5 normal
: ---
Assigned To: David Disseldorp
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-05-11 09:01 UTC by David Disseldorp
Modified: 2017-05-31 14:18 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Disseldorp 2017-05-11 09:01:22 UTC
As discussed on samba-technical, the existing clone-range behaviour should be moved out of vfs_btrfs and into vfs_default. The once btrfs specific BTRFS_IOC_CLONE_RANGE ioctl is now supported by multiple Linux filesystems as generic IOC_CLONE_RANGE ioctl.

On Thu, 4 May 2017 08:58:10 -0700, Christoph Hellwig wrote:

> On Thu, May 04, 2017 at 05:54:41PM +0200, David Disseldorp wrote:
> > On Thu, 4 May 2017 08:40:00 -0700, Christoph Hellwig wrote:
> >
> > > Not directly related to the patch, but IOC_CLONE_RANGE is a core
> > > VFS feature in Linux these days and for example support by XFS and NFS
> > > as well.  It's somewhat odd to have it in a vfs_btrfs module.
> >
> > Yeah, this'll hopefully get moved out of vfs_btrfs soon. A WIP
> > syscall(SYS_copy_file_range) patch from Björn is available at:
> > https://lists.samba.org/archive/samba-technical/2017-January/118259.html
>
> Don't use copy_file_range if you want to clone.  IOC_CLONE_RANGE is
> always the better choice if supported.