[PATCH] OS X SMB2 AAPL copyfile extension

Steve French smfrench at gmail.com
Fri Jun 26 16:26:02 MDT 2015


This reminds me that we really need to map the DUPLICATE_EXTENTS call
to Samba (at least on btrfs, but if other fs support it that would
also be helpful) - it is preferable to copy chunk in some cases and I
now have patches for cifs.ko for DUPLICATE_EXTENTS (and the normal
CopyChunk, not the apple extension, has been in a while), but I need
to know whether we could map it to SMB3 (and SMB3.02) not just SMB3.11
since it simply depends on File System Attribute
FILE_SUPPORTS_BLOCK_REFCOUNTING

so we can call DUPLICATE_EXTENTS for fast file copy if and only if
FILE_SUPPORTS_BLOCK_REFCOUNTING is returned in the File System
Attributes by Samba - but I would prefer not to make it dialect
specific (for Samba and cifs.ko) unless someone has a strong argument
for making fastest file copy dependent on something other than that
flag.



On Wed, Jun 17, 2015 at 3:49 AM, Ralph Böhme <rb at sernet.de> wrote:
> Hi all,
>
> attached is a patchset, reviewed my metze, that implements Apple's
> copyfile style copy_chunk semantics.
>
> Shamelessly c/p from the bugreport [1] I had created for this:
>
>   OS X SMB server and client use a special copychunk semantic that is
>   triggered by a chunk count of zero.
>
>   In response to this request, the server must copy the whole file at
>   once and also copy all attached file metadata.
>
>   OS X clients have a bug in the moment leading to file corruption if
>   using standard copychunk ioctl with file sizes over 2^31 bytes, so
>   this OS X style copyfile/copychunk ioctl can be used as a workaround
>   until Apple fixed their client.
>
>   Note that is indeed a single sync request that is expected to block
>   the server while the copy is in progress.
>
> Please review&push, thanks!
>
> -Ralph
>
> [1] <https://bugzilla.samba.org/show_bug.cgi?id=11317>
>
> --
> SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
> phone: +49-551-370000-0, fax: +49-551-370000-9
> AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
> http://www.sernet.de,mailto:kontakt@sernet.de



-- 
Thanks,

Steve

On Tue, Jun 23, 2015 at 7:43 AM, Ralph Böhme <rb at sernet.de> wrote:
> On Wed, Jun 17, 2015 at 10:49:10AM +0200, Ralph Böhme wrote:
>> Hi all,
>>
>> attached is a patchset, reviewed my metze, that implements Apple's
>> copyfile style copy_chunk semantics.
>>
>> Shamelessly c/p from the bugreport [1] I had created for this:
>>
>>   OS X SMB server and client use a special copychunk semantic that is
>>   triggered by a chunk count of zero.
>>
>>   In response to this request, the server must copy the whole file at
>>   once and also copy all attached file metadata.
>>
>>   OS X clients have a bug in the moment leading to file corruption if
>>   using standard copychunk ioctl with file sizes over 2^31 bytes, so
>>   this OS X style copyfile/copychunk ioctl can be used as a workaround
>>   until Apple fixed their client.
>>
>>   Note that is indeed a single sync request that is expected to block
>>   the server while the copy is in progress.
>>
>> Please review&push, thanks!
>
> pushed.
>
> -Ralph
>
> --
> SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
> phone: +49-551-370000-0, fax: +49-551-370000-9
> AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
> http://www.sernet.de,mailto:kontakt@sernet.de



-- 
Thanks,

Steve


More information about the samba-technical mailing list