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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 18, 2010 at 11:20 AM, David Woodhouse <dwmw2@xxxxxxxxxxxxx> wrote:
>
> Um, can't you? You can't *store* timestamps which are more precise, but
> they can be in cache can't they?

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

> And since you're not going to drop it from cache and bring it back in
> again within 4ms, that ought to suffice?

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
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux