lkml.org 
[lkml]   [2007]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] nanosecond filesystem support???
From
Date
On Tue, 2007-02-13 at 16:38 +0800, Jeff Chua wrote:
> On 2/12/07, Andi Kleen <ak@suse.de> 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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-02-13 09:45    [W:0.055 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site