Patch to add support for advertising FULLSYNC to Mac OSX Clients

Kevin Anderson andersonkw2 at
Tue Apr 11 01:31:07 UTC 2017

Hi Ralph,
   I have been testing this patch given what Jeremy stated and I think I agree with him based on my new understanding of things. :) The patch is essentially the same one that was sent out a little while ago with a minor tweak to the documentation. I think the automatic enablement of strict sync in the patch offers the same protection since the Time machine process does appear to block till the response comes back from the async flush. I tested by comparing the flush requests in a Wireshark capture to the fsync requests generated by strace on the smbd process.

I did find one issue though. With the patch disabled (AAPL=no,time machine=no) I am getting a Samba failure when initiating a backup (although I expect the backup to fail with an error about missing TM support since the FULLSYNC support is not enabled. In my opinion it should not cause the child process to exit). I can access the volume in Finder so it appears to be something specific that is occurring when the Time Machine support is checked. I applied the patch on the current master branch. Do you have any thoughts on this?

-Kevin Anderson

-------------- next part --------------
A non-text attachment was scrubbed...
Name: fruit_timemachine.patch
Type: application/octet-stream
Size: 4138 bytes
Desc: not available
URL: <>
-------------- next part --------------

> On Apr 10, 2017, at 12:02 PM, Jeremy Allison <jra at> wrote:
> On Mon, Apr 10, 2017 at 07:38:05AM -0400, Kevin Anderson wrote:
>> Hi Jeremy,
>>   I would appreciate it if someone could reach out to Apple regarding
>> the detail of the specification since I do not have any contacts there
>> myself.
>>> Blocking is not a magic bullet. It doesn't get you
>>> anything waiting for an async response doesn't also
>>> get you.
>> This is my first attempt at getting something to work within the SMB
>> protocol so for my own information, to make this flush request
>> asynchronous would you pend the SMB Flush Response back to the client
>> till an fsync is completed by the server?
> Yes, that is built into the current SMB2 server engine.
>> Or does the current code
>> already have that same effect?
> No, anything calling a synchronous fsync() call will
> block. If the Apple spec really requires no reply contact
> from the server whilst this is done, we can just temporarily
> disable the intermediate response code (or make it 60+
> seconds for this request, enough for the client to time
> out).

More information about the samba-technical mailing list