From: David Laight <david.laight.linux@gmail.com>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
"Artem S. Tashkinov" <aros@gmx.com>,
linux-ext4@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: A syscall for changing birth time
Date: Tue, 11 Mar 2025 20:01:19 +0000 [thread overview]
Message-ID: <20250311200119.4802d896@pumpkin> (raw)
In-Reply-To: <20250311170725.GE8837@mit.edu>
On Tue, 11 Mar 2025 13:07:25 -0400
"Theodore Ts'o" <tytso@mit.edu> wrote:
> On Tue, Mar 11, 2025 at 04:56:35AM +0000, Al Viro wrote:
> > On Tue, Mar 11, 2025 at 12:49:35AM -0400, Theodore Ts'o wrote:
> >
> > > This really goes to my question of exactly how useful the file
> > > creation time concept really is. Perhaps that's why the developers at
> > > the UC Berkley made ctime be "inode change time", I suspect when they
> > > authored the BSD Fast File System 42 years ago. Personally, while I
> > > don't find "change time" to be all that useful --- I find "creation
> > > time" an order of magnitude *more* useless. :-)
> >
> > The third timestamp had been introduced in v7 and it had been "change
> > time" from the very beginning, with incremental backups as stated
> > rationale in filesys(5). "I'm sure that" from David means "I couldn't
> > be arsed to check my WAG"...
>
>
> I actually pulled down the V7 sources and there was a comment in
> /usr/sys/h/ino.h which has a comment around the on-disk inode stating
> "creation time" (see below). These comments are also there up to
> 3BSD, and changed to "inode change time" in the BSD 4.2 sources,
> probably coincident with the BSD Fast File System implementation.
>
> So to be fair to David, I'm guessing this is what he saw.
Quite likely - it was a long time ago and I didn't take an 'offsite
backup' of the sources (and I definitely have nothing that will read
the system disk from an old 68010 box).
I didn't use Unix until the mid 80s - and I think that was SVR2 rather
than anything Berkeley. Most of the systems were SVR4 - around the time
of the initial collaboration between AT&T and Sun to get SMP working
(which, IIRC, pulled some BSD code into SVR4).
> I still maintain that "creation time" as a concept isn't terribly
> useful, and that's probably *why* historical Unix systems have used
> ctime as "change time" for decades. Whether it's 42 years or 45 years
> doesn't really change my point.
I do have half a brain cell that remembers it not quite being 'file
create' time - probably just changes to di_mode, di_uid or di_gid.
Anyway it is all old history.
David
>
> - Ted
>
> struct dinode
> {
> unsigned short di_mode; /* mode and type of file */
> short di_nlink; /* number of links to file */
> short di_uid; /* owner's user id */
> short di_gid; /* owner's group id */
> off_t di_size; /* number of bytes in file */
> char di_addr[40]; /* disk block addresses */
> time_t di_atime; /* time last accessed */
> time_t di_mtime; /* time last modified */
> time_t di_ctime; /* time created */
> };
>
prev parent reply other threads:[~2025-03-11 20:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-10 7:26 A syscall for changing birth time Artem S. Tashkinov
2025-03-10 13:58 ` Theodore Ts'o
2025-03-10 14:11 ` Artem S. Tashkinov
2025-03-10 15:37 ` Theodore Ts'o
2025-03-11 16:08 ` David Sterba
2025-03-11 21:14 ` Theodore Ts'o
2025-03-10 22:12 ` David Laight
2025-03-11 0:31 ` Al Viro
2025-03-11 4:49 ` Theodore Ts'o
2025-03-11 4:56 ` Al Viro
2025-03-11 17:07 ` Theodore Ts'o
2025-03-11 18:11 ` Al Viro
2025-03-11 20:01 ` David Laight [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250311200119.4802d896@pumpkin \
--to=david.laight.linux@gmail.com \
--cc=aros@gmx.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox