Created attachment 15507 [details] WIP patch for master There's an ussue when exporting from Adobe Illustrator package directly to a Samba share. When exporting a project that contains several copies of the same image, multiple number of files are created instead of having just one file. Steps to reproduce: 1. Create an illustrator project with few copies of the same image, so the same image will be used many times in the same project. 2. Go to Files -> export 3. Go to the destination folder--> enter the Links folder --> the folder will contain multiple images (as the number of links). Expected behavior: The links folder should contain only one copy of file that being used in the project. The same works correctly against a Windows server. The problem seems to be, that the image file's modification date is not set to the correct value as requested by the client There's a strange interaction between a write on a file handle followed by an explicit set of the filesize on the same file handle and a following explicit set of the write time on second handle that affects the observable write time of the file on the first handle when it's closed. Windows servers returns the explicitly set write time, Samba returns the time when the handle that did the write IO is closed. It seems setting the filesize on a handle immediately flushed any pending write time updates, so the write time is not updated when the handle is closed.
This needs careful review and testing against Windows.
Why make this optional ? If it makes us match what Windows does we should just enable it unreservedly (IMHO). Of course, more testing would help nail down the exact Windows behavior here.
Created attachment 15876 [details] git-am fix for 4.12.next Cherry-picked from master
Created attachment 15877 [details] git-am fix for 4.11 Back-ported from the 4.12 fix. Note - the source4/torture/smb2/timestamps.c patches are not included as 4.11 doesn't have that test. Only the smbd changes are present in this patchset.
Reassigning to Karolin for inclusion in 4.11 and 4.12.
(In reply to Ralph Böhme from comment #5) Pushed to autobuild-v4-{11,12}-test.
Pushed to both branches. Closing out bug report. Thanks!