Re: [PATCH] nanosecond filesystem support???

From: Arjan van de Ven
Date: Tue Feb 13 2007 - 03:43:25 EST


On Tue, 2007-02-13 at 16:38 +0800, Jeff Chua wrote:
> On 2/12/07, Andi Kleen <ak@xxxxxxx> wrote:
>
> > The bigger problem is getting a file system that support it.
>
>
> Andi,
>
> It seems that the part that's not returning nanosecond is in the code
> below. I've modified it, and now stat() is returning st_mtim.tv_nsec
> correctly.
>
> I've tested it on ext2 and reiserfs, and both seems to be working.
>
>
> I don't know why "t.tv_nsec = 0;" was set in the code. Any idea?

it was there to avoid the following situation:

on disk it's still in seconds
kernel has the inode in memory, with a recently updated times
user asks for it, gets nanoseconds data
kernel evicts inode to disk
user asks again,
kernel reads from disk (in whole seconds only on disk)
kernel reports a DIFFERENT time than it did before
user program gets confused

this actually happens, make is one of those cases that get confused for
example..

--
if you want to mail me at work (you don't), use arjan (at) linux.intel.com
Test the interaction between Linux and your BIOS via http://www.linuxfirmwarekit.org

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