From: Brad Boyer Subject: Re: ext4 - getting at birth time (file create time) and getting/setting nanosecond time stamps and utime Date: Wed, 21 Oct 2009 11:56:16 -0700 Message-ID: <20091021185616.GA11039@cynthia.pants.nu> 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: text/plain; charset=us-ascii Cc: Henrik Nordstrom , Sunil Mushran , jim owens , linux-fsdevel , Andreas Dilger , samba-technical To: Steve French Return-path: Received: from [76.245.85.235] ([76.245.85.235]:44378 "EHLO cynthia.pants.nu" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1754657AbZJUS4r (ORCPT ); Wed, 21 Oct 2009 14:56:47 -0400 Content-Disposition: inline In-Reply-To: <524f69650910210836t797fbf75q8285d9cd155be538@mail.gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, Oct 21, 2009 at 10:36:00AM -0500, Steve French wrote: > 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) I think the right way to do it would be to implement a system call for pathconf/fpathconf and add a selector for timestamp granularity. This obviously isn't an instant fix since it's not there already, but I think it's the right long-term interface. We already have the functions available in libc, but currently they don't call into the kernel for anything. If there was a system call and an operation somewhere in the VFS code to call into the individual drivers, then we could export this as well as lots of other useful information. It would also be based on a POSIX standard interface. Brad Boyer flar@allandria.com