From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steve French Subject: Re: ext4 - getting at birth time (file create time) and getting/setting nanosecond time stamps and utime Date: Tue, 20 Oct 2009 16:37:08 -0500 Message-ID: <524f69650910201437u50838429t8ffbbe737979bc16@mail.gmail.com> References: <524f69650910191017j7883ed7bvdb0329d1a73f34e4@mail.gmail.com> <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> <4ADE2A61.5040505@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: jim owens , linux-fsdevel , Andreas Dilger , samba-technical To: Sunil Mushran Return-path: In-Reply-To: <4ADE2A61.5040505@oracle.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 On Tue, Oct 20, 2009 at 4:23 PM, Sunil Mushran w= rote: > Steve French wrote: >> >> On Tue, Oct 20, 2009 at 3:59 PM, Sunil Mushran >> wrote: >>> >>> Steve French wrote: >>>> >>>> So, are we ready for Mingming or one of the ext4 developers to propose >>>> a patch for this via xattrs (I can do a similar one for cifs). >>>> Sounds like various have said: >>>> >>>> 1) xattrs instead of ioctl >>>> 2) get of create time allowed by default, but set of create time limit= ed >>>> >>>> But for the second part of this - how should we set nanosecond >>>> timestamps for the others (or in Samba's case, rounded to 100 >>>> nanoseconds for DCE time) ... a millisecond granularity for utimes is >>>> a very long time these days. >>> >>> What's wrong with stat(2)? AFAIK, it supports nanoseconds. >> >> An earlier post from Mingming IIRC noted that utimes does not support >> setting nanosecond timestamps (e.g. write time). >> >> "The function utime() allows specification of time stamps with a >> resolution of 1 second. ... The function utimes() is similar, but the >> times argument allows a reso lution of 1 microsecond for the >> timestamps. " =A0 1 millisecond is not sufficient, and as a result Samba >> has to store duplicate time stamps (in Samba specific xattrs) which we >> would like to avoid wherever possible > > If you are trying to update it, you can use utimensat(2). Looks like that should work based on what I see in fs/utimes.c ... but I have heard from two that think it doesn't work, so time to test it ... (unfortunately the libc is not new enough on this system ... ugh). --=20 Thanks, Steve