lkml.org 
[lkml]   [2007]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH] update ctime and mtime for mmaped write
    From
    Date
    > > > > This flag is checked in msync() and __fput(), and if set, the file
    > > > > times are updated and the flag is cleared
    > > >
    > > > Why not also check inside vfs_getattr?
    > >
    > > This is the minimum, that the standard asks for.
    > >
    > > Note, your porposal would touch the times in vfs_getattr(), which
    > > means, that the modification times would depend on the time of the
    > > last stat() call, which is not really right, though it would still be
    > > conforming.
    > >
    > > It is much saner, if the modification time is always the time of the
    > > last write() or msync().
    >
    > I disagree. The above doesn't allow a program like 'make' to discover
    > whether or not the file has changed by simply calling stat(). Instead,
    > you're forcing a call to msync()+stat().

    Yes, but that's the only portable way _anyway_.

    And it probably doesn't matter, programs using mmap to write to a file
    _will_ call msync, or at least close the file, when they're done.

    Thanks,
    Miklos
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-02-21 19:55    [W:0.022 / U:58.896 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site