copy chunk preliminary results

Christoph Hellwig hch at infradead.org
Thu Nov 21 04:20:44 MST 2013


On Thu, Nov 21, 2013 at 11:45:41AM +0100, David Disseldorp wrote:
> It depends on how the SMB server interprets the copy-chunk wire request.
> On Btrfs, Samba can translate the request into a BTRFS_IOC_CLONE_RANGE
> ioctl, in which case the same CoW semantics are observed[1]. See:
> 
> https://wiki.samba.org/index.php/Server-Side_Copy#Btrfs_Enhanced_Server-Side_Copy_Offload
> 
> By default however, Samba (and Windows) will perform the copy on the
> server-side using regular reads/writes. A generic cp --offload or
> similar would probably make more sense on the client side.

I don't think it really matters what the optimal case is, it matters
what the worst case is.  Think about it - a reflink really just is
a smart shortcut for copy + dedup, which a filesystem on the server
could do anyway.

On the other hand a user of cp --reflink expects it to be a quick
operation.

So it's time folks finally get the damn copyfile system call in, use
that for CIFS, NFS and co, as well as letting btrfs optimize it.


More information about the samba-technical mailing list