All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Jeff Chua <jeff.chua.linux@gmail.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
	Arjan van de Ven <arjan@infradead.org>,
	Miquel van Smoorenburg <miquels@cistron.nl>,
	Linus Torvalds <torvalds@osdl.org>
Subject: Re: [PATCH] nanosecond filesystem support???
Date: Tue, 13 Feb 2007 09:52:25 +0100	[thread overview]
Message-ID: <200702130952.26048.andi@firstfloor.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0702131627210.5124@boston.corp.fedex.com>


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

-Andi



  parent reply	other threads:[~2007-02-13  8:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-13  8:38 [PATCH] nanosecond filesystem support??? Jeff Chua
2007-02-13  8:42 ` Arjan van de Ven
2007-02-13  8:52 ` Andi Kleen [this message]
2007-02-13  9:09   ` Jeff Chua

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200702130952.26048.andi@firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=arjan@infradead.org \
    --cc=jeff.chua.linux@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miquels@cistron.nl \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.