Re: Nanosecond resolution for stat(2)

Andi Kleen (ak@suse.de)
24 Sep 2002 14:10:27 +0200


Andrew Pimlott <andrew@pimlott.net> writes:
>
> I assume you mean "theoretical" that an application would care, not
> that it would happen. (Unless I misunderstand, it is nearly
> guaranteed to happen every time an inode is evicted after a
> [mac]time update.)

Only when you use an old file system. I tguess even ext2 and ext3 will
learn about nsec timestamps eventually (e.g. by increasing the inode to
the next power of two because there are many other contenders for new
inode fields too)

>
> I fear that there are applications that will be harmed by any
> spurious change in [mac]time, even if it's not backwards. Apps that

When they only look at the second part nothing will change for them.

If applications that do look at nsecs have serious problems with this
backwards jumping it's still possible to add upwards rounding. I didn't
want to do this for the first cut to avoid over engineering.
>
> > If it should be one in practice
> > it could be fixed by rounding the time up in this case.
>
> This would mean that even "legacy" programs that only use second
> resolution would be affected, which seems worse. At least programs
> that recognize the nanosecond field are more likely to know about
> the issue.

Well, there is some change in behaviour. You have to live with that.

-Andi
-
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/