[lkml]   [2007]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] nanosecond filesystem support???

> 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?

The first hunk doesn't make any sense. stime() will never know anything about
nanoseconds. You're just putting uninitialized memory in there.

The truncation you removed in the second was deliberately added for the old file
systems that don't support higher granuality *times. Otherwise
the time can jump backwards between a inode that is still cached
in memory and one that is saved/restored from disk. Several programs
(including make) assume this cannot happen, so the kernel prevents it
by always rounding.

If you want ns resolution you need a file system that supports it:
that's currently XFS, JFS, NTFS/CIFS (resolution is lower, but < 1s), NFSv[34], UDF,
with suitable servers, tmpfs/ramfs/hugetlbfs. ext4 ns support is being worked on,

BTW the real max resolution supported in the kernel right now is jiffies.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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