[Samba] Samba and BTRFS server-side copy
jra at samba.org
Fri Oct 28 00:14:55 UTC 2016
On Fri, Oct 28, 2016 at 02:02:57AM +0200, Saint Germain via samba wrote:
> On Thu, 27 Oct 2016 16:57:13 -0700, Jeremy Allison <jra at samba.org>
> wrote :
> > On Fri, Oct 28, 2016 at 01:42:35AM +0200, Saint Germain via samba
> > wrote:
> > > On Thu, 27 Oct 2016 16:27:05 -0700, Jeremy Allison <jra at samba.org>
> > > > if you see any of these then it happened.
> > >
> > > Ok I understand how to check that it happened, but how can I make
> > > sure that it doesn't happen ?
> > > How can I ensure that clone range request sizes are integer
> > > divisible by 4096 on my server ?
> > > Should I change something on the BTRFS filesystem, or shift my
> > > partition or something ?
> > Nope. It's not a critical error. In smbclient, scopy
> > requests a copy of the entire filesize. The libsmbclient
> > layer splits this into copychunk requests of default
> > size 1mb - which is certainly integer divisible by
> > 4096.
> > The only time you'll get the server copy is if the
> > last chunk isn't divisible by 4096. It's not a problem.
> Thank you very much for all the help and explanations.
> It's much clearer now.
> So if I understand correctly, as long as the client send the
> FSCTL_SRV_COPYCHUNK, it should be ok.
> The FSCTL_SRV_COPYCHUNK instructions seems to be included in SMB2 in
> smbclient starting from version 4.3.
> On linux, most current utilities like Nautilus (gvfs) still use SMB1 to
> connect, so there is no chance to trigger a server-side copy.
Well if you set the default to be SMB2 in your smb.conf then
gvfs will connect using SMB2.
However, gvfs would have to get the 'splice' function signature
using smbc_getFunctionSplice() and then call it in order to
I'm not sure if gvfs does that.
More information about the samba