[Samba] stale timestamp hell
Jeremy Allison
jra at samba.org
Sat Apr 11 20:50:04 GMT 2009
On Sat, Apr 11, 2009 at 01:26:43PM -0700, Chuck T. wrote:
>
> I've been using a Windoze based programming editor (Slickedit) across
> samba shares for years without any problems (most recently with FC5). I've
> just started using Ubuntu and I'm now having a problem with timestamps
> lagging file writes. The net result is my editor almost always
> thinks another program has modified the file.
>
> Today I built and installed samba 3.3.3. from sources and it shows
> the same problem.
>
> The problem is easy to demonstrate with a batch file:
>
> ---
> Z:\home\skip>type test.bat
> dir e
> touch e
> dir e
>
> Z:\home\skip>test
>
> Z:\home\skip>dir e
> Volume in drive Z is root
> Volume Serial Number is 0BF5-02B0
>
> Directory of Z:\home\skip
>
> 03/25/2009 05:00 PM 2,878 e
> 1 File(s) 2,878 bytes
> 0 Dir(s) 60,616,773,632 bytes free
>
> Z:\home\skip>touch e
>
> Z:\home\skip>dir e
> Volume in drive Z is root
> Volume Serial Number is 0BF5-02B0
>
> Directory of Z:\home\skip
>
> 03/25/2009 05:00 PM 2,878 e
> 1 File(s) 2,878 bytes
> 0 Dir(s) 60,616,773,632 bytes free
>
> Z:\home\skip>dir e
> Volume in drive Z is root
> Volume Serial Number is 0BF5-02B0
>
> Directory of Z:\home\skip
>
> 04/11/2009 01:11 PM 2,878 e
> 1 File(s) 2,878 bytes
> 0 Dir(s) 60,616,773,632 bytes free
> ---
>
> As you can see running touch and then an immediate directory
> listing shows the old timestamp for the file. When I do a
> directory manually a second later the timestamp has been
> updated.
The delayed timestamp on write is correct, it's "what Windows
does" (tm). Took us a long time to emulate that correctly :-).
To nail this we'd need a comparitive sniff against the same
save being done on a Windows server, with a note as to when
the "file was changed" dialog would have appeared against Samba.
Jeremy.
More information about the samba
mailing list