Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 May 2000 13:15:26 +1000
From:      Peter Jeremy <peter.jeremy@ALCATEL.COM.AU>
To:        Arun Sharma <adsharma@sharmas.dhs.org>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: file creation times ?
Message-ID:  <00May25.131527est.115222@border.alcanet.com.au>
In-Reply-To: <20000524185859.A19573@sharmas.dhs.org>; from adsharma@sharmas.dhs.org on Thu, May 25, 2000 at 11:59:41AM %2B1000
References:  <00May25.110340est.115250@border.alcanet.com.au> <20000524185859.A19573@sharmas.dhs.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2000-May-25 11:59:41 +1000, Arun Sharma <adsharma@sharmas.dhs.org> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00May25.131527est.115222>