Created attachment 9988 [details]
From a gvfs bug , if the following operations occur, the close() updates the mtime set by utimes (not the atime).
This causes problems with our fuse layer because some programs (like cp --preserve=timestamp) set the mtime before the final close, which causes timestamps not to be preserved.
This works as expected with normal POSIX operations and with the cifs kernel module. It also looks a bit like bug 6520.
I have attached a test program to demonstrate the issue.
Thanks for looking at this!