From mboxrd@z Thu Jan 1 00:00:00 1970 From: jim owens Subject: Re: ext4 - getting at birth time (file create time) and getting/setting nanosecond time stamps and utime Date: Tue, 20 Oct 2009 08:44:13 -0400 Message-ID: <4ADDB09D.5000707@hp.com> References: <524f69650910191017j7883ed7bvdb0329d1a73f34e4@mail.gmail.com> <524f69650910191245t2eb7ffb2r770a7373ec2ba1e3@mail.gmail.com> <5715838A-4568-4273-B1C1-983B348580B6@sun.com> <524f69650910191524k5c9d766fu430c4f7b17d86952@mail.gmail.com> <890110E9-FA69-4356-9BEB-925F98487C52@sun.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Steve French , linux-fsdevel , samba-technical To: Andreas Dilger Return-path: Received: from g6t0185.atlanta.hp.com ([15.193.32.62]:15825 "EHLO g6t0185.atlanta.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751855AbZJTMoL (ORCPT ); Tue, 20 Oct 2009 08:44:11 -0400 In-Reply-To: <890110E9-FA69-4356-9BEB-925F98487C52@sun.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Andreas Dilger wrote: > On 19-Oct-09, at 16:24, Steve French wrote: >> On Mon, Oct 19, 2009 at 3:11 PM, Andreas Dilger wrote: >>> As for being able to write to the "create time" attribute, I would >>> prefer >>> that this be a filesystem mount option. For some users (myself >>> included) >>> I don't care whether Windows is unhappy that it can't update this >>> creation >>> time - I'd prefer to know when a file is actually created. >> >> I agree - if create time could be overwritten - that behavior hould be >> configurable (another post mentioned the alternative to mount >> option - a flag for this perhaps along the lines of the a "backup intent" >> flag - although somewhat different than what Windows uses that for). > > If this is a flag that a user can configure/select themselves, then it > is completely useless to me. If it is a mount option and/or possibly an > additional process capability that would be more useful. Restricting the modification of create time is pointless. A number of filesystems and operating systems besides windows have create time and it MUST be settable on restore just like the access and modification times. There is no value in it needing "special privileges". What you are forgetting is *NO* timestamp on a filesystem can be trusted to be correct. All times are just fields set based on what the system thinks the time is now (not to mention that any disk editor can change the field). The "now time" can be intentionally or accidentally set wrong, or as has happened to me, a totally crap value from a bad RTC battery. :) I did legal records storage a long time ago, and I can guarantee you disk timestamps are meaningless. On the other hand, if you just want stamps for debugging and internal purposes, then you do what I did, put versions and times inside on-disk metadata structures the filesystem does not expose. As long as you remember all stamps are still at the mercy of those who can patch your clock, your code, and your raw disk blocks. jim