[linux-cifs-client] set last write time = fsync ?

Steve French smfrench at gmail.com
Thu Mar 13 03:54:50 GMT 2008


kukks noticed that "cp -p source-file /cifs-mnt" would not set the
last write time to the previous time

It looks like a straightforward caching sideffect - "cp -p" does

open
write
set time stamps (utimensat)
set uid/gid (fchown32)
set acl (setxattr(system.posix_acl_access))

but the write is cached until close (which does a flush just before
the close) - so the final write resets the time which was set
correctly earlier

Should we add logic to cache the set of the time stamps too (at least
when there is write behind cache data)?  This would also allow us to
avoid setting the timestamp in some cases in which a write happened
after the setattr of the timestamp.

I don't really want to get to the point where utimes ==> fsync  that
seems way overdone

Thoughts?

-- 
Thanks,

Steve


More information about the linux-cifs-client mailing list