Is it possible to switch-off the preservation of the file timestamps (access and modification times) on file copy?

Jeremy Allison jra at samba.org
Fri Oct 17 00:38:15 GMT 2008


On Fri, Oct 17, 2008 at 02:13:34AM +0200, Jiri Sasek - RPE Prague wrote:
> Hello samba gurus
>
> Samba start using the utimes() call to preserve the access and  
> modification times of the transferred file. This change happens  
> somewhere between the 3.0.2 and 3.0.14 where I did not investigated it  
> exactly. Evaluating this problem some time ago I have found this  
> behavior can not be changed by any of the configuration option. Am I 
> right?
>
> Case can be the storage of the huge DVD images running on the multi-node  
> filessytem (SAM-QFS for instance) accessed via the Windows Explorer.  
> Win.Explorer is copyingthe files in 64k blocks setting the time-stamp of  
> the target file on every block transfer. utimes() operation seems to be  
> much more time consuming on the multi-node filesystem which keeps the  
> consistency of such timestamps  between the single nodes. This is making  
> the copy operation extremely slow in comparison of the usage of the  
> simple filesystem nor the usage of the "copy" command line utility.
>
> I suppose the simple option:
>
> "preserve timestamps = [yes/no]"   (default: yes)
>
> can fix this problem. Is there anybody who also supports such "feature"?

I don't think this happens any more in Samba 3.2.0 and above.

The timestamp handling for Windows clients is handled
in userspace in the current 3.2.x git code, so there
is no longer the need to change the on-disk write time
on each write as was done in 3.0.x versions of Samba.

3.2.x still updates the on disk time on explicit file
time set, and on close when it's required, but we
no longer do this on every write in the latest code.

So the fix is to upgrade your shipping Samba version
to the latest 3.2.x code, it's a bug we've already
fixed.

Jeremy.


More information about the samba-technical mailing list