From: =?iso-8859-1?Q?Bj=F6rn?= Jacke 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 Message-ID: References: <5715838A-4568-4273-B1C1-983B348580B6@sun.com> <524f69650910191524k5c9d766fu430c4f7b17d86952@mail.gmail.com> <890110E9-FA69-4356-9BEB-925F98487C52@sun.com> <4ADDB09D.5000707@hp.com> <6E5D19DA-64C5-4A44-9DF4-BEF2AA8DD8AB@sun.com> <524f69650910201349w20a3145cm6b88cd4029912b6b@mail.gmail.com> <4ADE24C2.20009@oracle.com> <524f69650910201411j3dc4897bic8a042cb17fcede8@mail.gmail.com> <1256126392.493.640.camel@localhost.localdomain> <524f69650910210836t797fbf75q8285d9cd155be538@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-ripemd160; protocol="application/pgp-signature"; boundary="azLHFNyN32YCQGCU" Cc: Sunil Mushran , Andreas Dilger , samba-technical , Henrik Nordstrom , linux-fsdevel , jim owens To: Steve French Return-path: Content-Disposition: inline In-Reply-To: <524f69650910210836t797fbf75q8285d9cd155be538@mail.gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: samba-technical-bounces@lists.samba.org Errors-To: samba-technical-bounces@lists.samba.org List-Id: linux-fsdevel.vger.kernel.org --azLHFNyN32YCQGCU Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2009-10-21 at 10:36 -0500 Steve French sent off: > On Wed, Oct 21, 2009 at 6:59 AM, Henrik Nordstrom > wrote: > > utimen -> nanosecond =A0(struct timespec) (1/1000000000), same granular= ity > > as current stat(), clock_gettime() and friends. >=20 > 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 filesyst= em 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 grea= test 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 ca= ll 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 modi= fy it timewise in one direction. Cheers Bj=F6rn [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 se= cond element is older than the currently set birth time. --azLHFNyN32YCQGCU Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (GNU/Linux) iEYEAREDAAYFAkrfk0gACgkQdoo0s+hIejlMXwCg0cUeD5GoyAJBPdHhJ90649CZ OXMAn3Rt1QqjKwP0NcYooWYAs6zNXr1s =6/NT -----END PGP SIGNATURE----- --azLHFNyN32YCQGCU--