On 05/11/11 01:49, Markus Duft wrote:
> fsync(fd) before setting the timestamp helps, and i have a 1.26 patch 
> (attached),
> for now limited to interix only, although i saw it on linux too.

Can you describe the GNU/Linux scenario?  That would be a serious
file system bug.  There are known bugs when running glibc compiled
against newer headers but on older Linux kernels, but tar should
work around those bugs; see gnu/futimens.c.  Why isn't that
happening for you?

Which system call is being used in Interix?  Is it futimens,
or utimensat, or what?  Sorry, I've lost context.

The workaround you sent doesn't look quite right.  Surely the fix
belongs in the implementation of fdutimensat, not in just one of its
callers.  And there must be something faster than calling fsync.
Did you try the fix that Eric Blake suggested in
<http://lists.gnu.org/archive/html/bug-tar/2011-02/msg00004.html>?

Finally, to answer your earlier question, it's clearly a filesystem
bug.  I could cite POSIX chapter and verse on this, but I'd rather
use a common sense argument: what's the point of having a system call
like futimens if closing the file erases the work that futimens does?

Reply via email to