Linux filesystem development
 help / color / mirror / Atom feed
From: Mingming <cmm@us.ibm.com>
To: Andreas Dilger <adilger@sun.com>
Cc: Steve French <smfrench@gmail.com>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	samba-technical <samba-technical@lists.samba.org>
Subject: Re: ext4 - getting at birth time (file create time) and getting/setting nanosecond time stamps and utime
Date: Mon, 19 Oct 2009 17:41:03 -0700	[thread overview]
Message-ID: <1255999263.4257.84.camel@mingming-laptop> (raw)
In-Reply-To: <D2990D51-2E89-4AA1-8434-7D9C3061D510@sun.com>

On Mon, 2009-10-19 at 12:55 -0600, Andreas Dilger wrote:
> On 19-Oct-09, at 11:17, Steve French wrote:
> > A new version of the format for Samba server related file system
> > extended attributes is expected in the next version of Samba so the
> > topic of create time and nanosecond timestamps for Linux has come up
> > again.  Since some file systems don't support storing create time
> > (birth time), and none support updating create time, or for that
> > matter for storing any nanosecond timestamps at all (a millisecond
> > seems like a much longer time today than when the stat structure was
> > defined), and dos attributes, Samba server stores these in extended
> > attributes, which is awkward on those file systems which store
> > (different) versions of these on disk.
> 
> I had proposed in the past that these file attributes be exposed to
> userspace as virtual xattrs, e.g. user.cr_time returning a struct
> timespec, but the data is stored internal to the filesystem in whatever
> format is most efficient for it.  We only strictly need user.crtime
> for this, but I wouldn't object to exporting other inode attributes in
> this way (e.g. user.mtime, user.atime, etc).
> 
> I believe that nanosecond timestamps ARE supported with newer  
> filesystems
> using stat().  There is the utimensat() system call, which takes a  
> timespec
> parameter, so it looks to be suitable for setting nanosecond timestamps
> from userspace.  I don't know if glibc() supports this, but I do see it
> in the kernel.
> 

How we are going to set the nanotimestamps today? utimes(2) man page
seems indicating it only support setting time at  microseond level.

> As for _updating_ create time, isn't that sort of defeating the purpose
> of create time?
> 

Perphas the backup/restore wants to preserve the original creation
timestamp after the file being backuped?

> Cheers, Andreas
> --
> Andreas Dilger
> Sr. Staff Engineer, Lustre Group
> Sun Microsystems of Canada, Inc.
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



      parent reply	other threads:[~2009-10-21 22:48 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
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 [this message]

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=1255999263.4257.84.camel@mingming-laptop \
    --to=cmm@us.ibm.com \
    --cc=adilger@sun.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=samba-technical@lists.samba.org \
    --cc=smfrench@gmail.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