On Tue, Mar 11, 2025 at 09:38:39PM -0600, Warner Losh wrote:
> So I think I have to disagree about what it means in v7, comments
> notwithstanding.
>
> iupdat() has:
> if(ip->i_flag&ICHG)
> dp->di_ctime = time;
>
> ICHG is set in unlink(), chmod(), chown() and utime() (maybe a few others,
> this was a quick peek).
>
> So even in v7, ctime means any changes to metadata / inode data. At least
> for some definition of "any".
>
> Btw, it looks like this was named IUPD in v6 and did similar things. In v6
> it is updated in iput when IUPD is set. But it looks like ctime and mtime
> are folded together. So v7 is the first edition that has ctime and the code
> implements any change to metadata from my reading.
Yeah, Al Viro (the chief Pengiun VFS maintainer) had made a similar
observation to yours. After I pointed out the Ritchie and Thompson
Unix paper, Al also pointed out that comment could be found in the
filsys.5 man page[1] dating from January 1979, also says "creation
time" although that is an excerpt from the ino.h header file, the
comment of which, as I said, persisted into 2BSD and 3BSD.
[1] https://www.tuhs.org/cgi-bin/utree.pl?file=2.9BSD/usr/man/man5/filsys.5
So this is why we were wondering whether if there was sometime when it
actually *was* creation time, perhaps in between the v6 and v7
releases, or whether it was always just a comment brain fart, which
also managed to make it into a published paper and the filsys.5 man
page, with no one caring enough to fix it until several years went by,
and perhaps only at Berkeley. (I'm curious when if ever it got fixed
in the AT&T sources, but I haven't gone and checked those sources
yet.)
It's because we were genuinely interested that I decided to ask on
TUHS list. Some of us *do* care about the Unix history. :-)
- Ted