Bug 11078 - mtime changes after fsync(); fclose();
Summary: mtime changes after fsync(); fclose();
Status: NEW
Alias: None
Product: CifsVFS
Classification: Unclassified
Component: kernel fs (show other bugs)
Version: 3.x
Hardware: x64 All
: P5 minor
Target Milestone: ---
Assignee: Steve French
QA Contact: cifs QA contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-27 21:26 UTC by Jakob Unterwurzacher
Modified: 2020-07-16 00:12 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