Need Help on updating the write time for every SMB write

Jeremy Allison jra at
Tue Sep 4 19:39:54 UTC 2018

On Tue, Sep 04, 2018 at 06:56:48PM +0000, Roy, UjjalX wrote:
> ​Hello Sir,
> In samba it does the below two things – set mod time value and will set it
> after each write. Marked as RED in below two code sections. I need help on this
> updating after every write operation. As I am not a master of samba, so I have
> below queries.
> ·        From the comment we can see this is the solution of bug #2045 for the
> use of samba in Windows NT system – does it still valid?
> ·        Can we skip this updating of the timestamp after every write operation
> and write only when the close operation is done?
> ·        If so, on close operation – what could be the better way of doing
> this? Shall we skip updating timestamp on every write directly and updating
> during close will be done normally – will that help?

 CC:ing samba-technical list as this is a discussion that belongs

The update write time code is correct for the behavior of Windows 2000,
but this has changed in recent Windows releases. See bug:

for details. Metze is planning to update our write time
implementation to match Windows 2016. See the work in
progress patches attached to the bug report.

Hope this helps,


More information about the samba-technical mailing list