Re: Proposal: Use hi-res clock for file timestamps

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Patrick J. LoPresti
Date: Wednesday, August 18, 2010 - 11:32 am

On Wed, Aug 18, 2010 at 11:20 AM, David Woodhouse <dwmw2@infradead.org> wrote:

No.  That is how Linux used to work, and it caused many problems,
which is why the current_fs_time() function was invented.


Not the problem.  As usual, the problem is out-of-order timestamps:

1) Modify file A
2) Modify file B
3) File B's inode gets evicted, truncating its timestamp to disk resolution
4) Call stat() on B, bringing it back in with truncated resolution

And boom, B appears to be OLDER than A.  Which is not allowed.

This is exactly what happened when Linux first added sub-second
timestamps to the generic VFS layer.  Many complaints about "make"
rebuilding files unecessarily, among other things.  Eventually it got
fixed by the introduction of current_fs_time().

 - Pat
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Proposal: Use hi-res clock for file timestamps, Patrick J. LoPresti, (Fri Aug 13, 11:25 am)
Re: Proposal: Use hi-res clock for file timestamps, john stultz, (Fri Aug 13, 11:45 am)
Re: Proposal: Use hi-res clock for file timestamps, Patrick J. LoPresti, (Fri Aug 13, 11:57 am)
Re: Proposal: Use hi-res clock for file timestamps, john stultz, (Fri Aug 13, 12:09 pm)
Re: Proposal: Use hi-res clock for file timestamps, Patrick J. LoPresti, (Fri Aug 13, 1:53 pm)
Re: Proposal: Use hi-res clock for file timestamps, Bret Towe, (Sat Aug 14, 6:50 pm)
Re: Proposal: Use hi-res clock for file timestamps, Andi Kleen, (Tue Aug 17, 7:54 am)
Re: Proposal: Use hi-res clock for file timestamps, J. Bruce Fields, (Tue Aug 17, 10:41 am)
Re: Proposal: Use hi-res clock for file timestamps, Andi Kleen, (Tue Aug 17, 11:29 am)
Re: Proposal: Use hi-res clock for file timestamps, Patrick J. LoPresti, (Tue Aug 17, 11:50 am)
Re: Proposal: Use hi-res clock for file timestamps, J. Bruce Fields, (Tue Aug 17, 12:04 pm)
Re: Proposal: Use hi-res clock for file timestamps, Patrick J. LoPresti, (Tue Aug 17, 12:18 pm)
Re: Proposal: Use hi-res clock for file timestamps, J. Bruce Fields, (Tue Aug 17, 12:29 pm)
Re: Proposal: Use hi-res clock for file timestamps, Patrick J. LoPresti, (Tue Aug 17, 12:34 pm)
Re: Proposal: Use hi-res clock for file timestamps, Alan Cox, (Tue Aug 17, 12:39 pm)
Re: Proposal: Use hi-res clock for file timestamps, Patrick J. LoPresti, (Tue Aug 17, 12:43 pm)
Re: Proposal: Use hi-res clock for file timestamps, J. Bruce Fields, (Tue Aug 17, 12:45 pm)
Re: Proposal: Use hi-res clock for file timestamps, Alan Cox, (Tue Aug 17, 12:52 pm)
Re: Proposal: Use hi-res clock for file timestamps, Alan Cox, (Tue Aug 17, 12:54 pm)
Re: Proposal: Use hi-res clock for file timestamps, Neil Brown, (Tue Aug 17, 10:53 pm)
Re: Proposal: Use hi-res clock for file timestamps, Patrick J. LoPresti, (Wed Aug 18, 7:46 am)
Re: Proposal: Use hi-res clock for file timestamps, J. Bruce Fields, (Wed Aug 18, 10:32 am)
Re: Proposal: Use hi-res clock for file timestamps, Chuck Lever, (Wed Aug 18, 11:15 am)
Re: Proposal: Use hi-res clock for file timestamps, David Woodhouse, (Wed Aug 18, 11:20 am)
Re: Proposal: Use hi-res clock for file timestamps, Patrick J. LoPresti, (Wed Aug 18, 11:32 am)
Re: Proposal: Use hi-res clock for file timestamps, Andi Kleen, (Wed Aug 18, 11:53 am)
Re: Proposal: Use hi-res clock for file timestamps, J. Bruce Fields, (Wed Aug 18, 11:54 am)
Re: Proposal: Use hi-res clock for file timestamps, Andi Kleen, (Wed Aug 18, 12:25 pm)
Re: Proposal: Use hi-res clock for file timestamps, J. Bruce Fields, (Wed Aug 18, 12:30 pm)
Re: Proposal: Use hi-res clock for file timestamps, Neil Brown, (Wed Aug 18, 4:41 pm)
Re: Proposal: Use hi-res clock for file timestamps, Neil Brown, (Wed Aug 18, 4:47 pm)
Re: Proposal: Use hi-res clock for file timestamps, Neil Brown, (Wed Aug 18, 5:52 pm)
Re: Proposal: Use hi-res clock for file timestamps, john stultz, (Wed Aug 18, 6:41 pm)
Re: Proposal: Use hi-res clock for file timestamps, J. Bruce Fields, (Wed Aug 18, 7:08 pm)
Re: Proposal: Use hi-res clock for file timestamps, J. Bruce Fields, (Wed Aug 18, 7:31 pm)
Re: Proposal: Use hi-res clock for file timestamps, Neil Brown, (Wed Aug 18, 7:44 pm)
Re: Proposal: Use hi-res clock for file timestamps, john stultz, (Wed Aug 18, 8:17 pm)
Re: Proposal: Use hi-res clock for file timestamps, J. Bruce Fields, (Thu Aug 19, 3:46 pm)