Bug 11078 - mtime changes after fsync(); fclose();
mtime changes after fsync(); fclose();
Status: NEW
Product: CifsVFS
Classification: Unclassified
Component: kernel fs
3.x
x64 All
: P5 minor
: ---
Assigned To: Steve French
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-01-27 21:26 UTC by Jakob Unterwurzacher
Modified: 2015-01-27 21:30 UTC (History)
0 users

See Also:


Attachments
Reproducer (1.41 KB, text/x-csrc)
2015-01-27 21:26 UTC, Jakob Unterwurzacher
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jakob Unterwurzacher 2015-01-27 21:26:43 UTC
Created attachment 10673 [details]
Reproducer

This was originally reported agains emacs: Emacs complained that the file has changed on disk while it really has not: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19607

However, the reproducer (attached) showed that the problem seems to be in the cifs client.

What it does is

    write
    fsync
    fstat
    close
    stat

The problem is that the second stat returns a slightly different timestamp. Example output:

    $ ~/fsync-mtime 
    stat #1: 1422393669.293420542
    stat #2: 1422393669.293420500

This causes the editor to detect a change.
Comment 1 Jakob Unterwurzacher 2015-01-27 21:30:17 UTC
$ uname -r
3.19.0-0.rc6.git0.1.vanilla.mainline.knurd.1.fc20.x86_64