linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Björn Jacke" <bj@SerNet.DE>
To: Steve French <smfrench@gmail.com>
Cc: Sunil Mushran <sunil.mushran@oracle.com>,
	Andreas Dilger <adilger@sun.com>,
	samba-technical <samba-technical@lists.samba.org>,
	Henrik Nordstrom <henrik@henriknordstrom.net>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	jim owens <jowens@hp.com>
Subject: Re: ext4 - getting at birth time (file create time) and getting/setting nanosecond time stamps and utime
Date: Thu, 22 Oct 2009 01:03:36 +0200	[thread overview]
Message-ID: <E1N0kBa-000Jih-4R@intern.SerNet.DE> (raw)
In-Reply-To: <524f69650910210836t797fbf75q8285d9cd155be538@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1849 bytes --]

On 2009-10-21 at 10:36 -0500 Steve French sent off:
> On Wed, Oct 21, 2009 at 6:59 AM, Henrik Nordstrom
> <henrik@henriknordstrom.net> wrote:
> > utimen -> nanosecond  (struct timespec) (1/1000000000), same granularity
> > as current stat(), clock_gettime() and friends.
> 
> Yes.   I have opened bug 6836 in samba bugzilla to track having smbd
> use utimensat (but not sure whether they will be able to detect when
> the file system can support nanosecond timestamps through - even with
> use of utimensat - so there may be questions about how to do runtime
> detection of whether the filesystem is one like ext4, xfs, jfs etc.
> that can store such timestamps, if not they probably still have to
> store 100 nanosecond "DCE time" granulariy timestamps in xattrs)

up to these days Samba just supports the granularity the undelying filesystem
supports and I think there is no need to change this. The utimensat
documentation says: "The file's relevant timestamp shall be set to the greatest
value supported by the file system that is not greater than the specified
time." So just using this call (where available) is all Samba will have to do -
I see nothing more to care about.

Unfortunately the designers of utimensat() didn't think of setting of birth
times on systems that have it. It would have been nice if this brand new call
had covered this, too. The FreeBSD folks thought about adding a system call to
set birth time.  All they currently have is a rather hackish[1] way to modify
it timewise in one direction.

Cheers
Björn

[1] http://fuse4bsd.creo.hu/localcgi/man-cgi.cgi?utimes+2
    ... For file systems that support file birth (creation) times (such as UFS2),
    the birth time will be set to the value of the second element if the second
    element is older than the currently set birth time.


[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

  parent reply	other threads:[~2009-10-21 23:03 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-19 17:17 ext4 - getting at birth time (file create time) and getting/setting nanosecond time stamps and utime Steve French
2009-10-19 18:55 ` Andreas Dilger
2009-10-19 18:58   ` Jeremy Allison
2009-10-19 19:37     ` Steve French
2009-10-19 19:12   ` Zach Brown
2009-10-19 20:49     ` Jamie Lokier
2009-10-19 19:45   ` Steve French
2009-10-19 20:11     ` Andreas Dilger
2009-10-19 22:24       ` Steve French
2009-10-19 23:12         ` Andreas Dilger
2009-10-20  3:31           ` Steve French
2009-10-20 12:44           ` jim owens
2009-10-20 20:33             ` Andreas Dilger
2009-10-20 20:49               ` Steve French
2009-10-20 20:59                 ` Sunil Mushran
2009-10-20 21:11                   ` Steve French
2009-10-20 21:23                     ` Sunil Mushran
2009-10-20 21:37                       ` Steve French
2009-10-20 21:49                         ` Sunil Mushran
2009-10-20 21:56                           ` Steve French
2009-10-20 22:16                             ` Sunil Mushran
2009-10-21 23:45                               ` Mingming
2009-10-21 11:59                     ` Henrik Nordstrom
2009-10-21 15:36                       ` Steve French
2009-10-21 18:56                         ` Brad Boyer
2009-10-21 23:03                         ` Björn Jacke [this message]
2009-10-22 21:50                           ` Steve French
2009-10-21  0:44                 ` Andreas Dilger
2009-10-21 23:42                   ` Mingming
2009-10-20 21:10               ` jim owens
2009-10-20  0:41   ` Mingming

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=E1N0kBa-000Jih-4R@intern.SerNet.DE \
    --to=bj@sernet.de \
    --cc=adilger@sun.com \
    --cc=henrik@henriknordstrom.net \
    --cc=jowens@hp.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=samba-technical@lists.samba.org \
    --cc=smfrench@gmail.com \
    --cc=sunil.mushran@oracle.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).