From owner-freebsd-hackers Wed May 24 20:15:22 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from alcanet.com.au (mail.alcanet.com.au [203.62.196.10]) by hub.freebsd.org (Postfix) with ESMTP id 0C3EA37B870 for ; Wed, 24 May 2000 20:15:17 -0700 (PDT) (envelope-from jeremyp@gsmx07.alcatel.com.au) Received: by border.alcanet.com.au id <115222>; Thu, 25 May 2000 13:15:27 +1000 Content-return: prohibited From: Peter Jeremy Subject: Re: file creation times ? In-reply-to: <20000524185859.A19573@sharmas.dhs.org>; from adsharma@sharmas.dhs.org on Thu, May 25, 2000 at 11:59:41AM +1000 To: Arun Sharma Cc: hackers@FreeBSD.ORG Message-Id: <00May25.131527est.115222@border.alcanet.com.au> MIME-version: 1.0 X-Mailer: Mutt 1.0i Content-type: text/plain; charset=us-ascii References: <00May25.110340est.115250@border.alcanet.com.au> <20000524185859.A19573@sharmas.dhs.org> Date: Thu, 25 May 2000 13:15:26 +1000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 2000-May-25 11:59:41 +1000, Arun Sharma wrote: >On Thu, May 25, 2000 at 11:03:38AM +1000, Peter Jeremy wrote: >> To put it another way, why _should_ FreeBSD store a file creation time? > >0. I'm tired of seeing people putting "Created: mm/dd/yy" in their documents. - UFS stores a UID for each file, but that doesn't stop "Author: J. Bloggs" in documents. Why would storing a creation timestamp be any different? - How do you determine the creation time of a file when it's printed? - If I make a copy of an existing file, was the new file created when the original file was created or when I did the copy? >1. NTFS does it. It's a part of SMB. That's not justification for putting a creation time into the UFS. Different filesystems store different information - depending on what the FS developers saw as important. You could just as easily point out the deficiencies of NTFS based on it's inability to support all the metadata in NFS. > I suspect that Samba just uses the last modified time. According to the SAMBA documentation, it uses the earliest of the 3 timestamps that are available. (Or can be told to fake a creation time of 1980-JAN-01 0000 on directories). Transferring file metadata between systems is always problematic. Generally the metadata translation layer does the best it can and fakes the rest. For example, NTFS access and modification timestamps can't be translated to Unix timestamps without knowing the location (timezone) where the NTFS file was last modified/accessed. >2. An average computer user would expect it. I didn't know that UNIX didn't > keep track of file creation times 5-6 years after I started using it. If it took you 5-6 years to notice that the creation time _wasn't_ stored, the creation time can't have been that important to you. (And I haven't previously run into anyone else who wanted a creation time, so the expectation can't be that widespread). > So if someone designs a ext3fs killer journalling >filesystem for BSD, would they consider adding it :) ? Adding a creation timestamp would add 4 or 8 bytes of metadata to each file, as well as requiring additional code (and CPU time) to manage it. A 6th Edition inode was 32 bytes (and only stored access and modify times). A FreeBSD inode is already 4 times as big. It's necessary to strike a balance between storing every possible piece of information about a file and the amount of space/time used to store/manage this metadata. A modification timestamp is essential to support incremental backups. Splitting it into separate data and metadata timestamps meets POLA (users generally want 'modification' to mean that the content changed, not that the file was renamed). Access timestamps are important for filespace management (knowing what files aren't used and can therefore be archived or deleted). As far as I'm concerned, you still haven't demonstrated any real need or justification for a creation timestamp. That said, there's nothing stopping you adding a creation timestamp to the UFS and providing patches. Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message