NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: birthtime [was: netbsd : internals : ...?]
On Jul 27 22:26, Robert Elz wrote:
>
> An easy way to counter my argument would be to produce a use for
> birthtime - something that you can actually use it for.
>
> Do be aware that "obviously it must be useful" will not do.
If you doubt about the usefulness of birthtime, you surely encountered
several reasons to do this.
> Also, birthtime is not specified by POSIX, so it can't be used portably
> in any event - but this is also not an objection if a good use for
> the data is found (one which can be implemented in a way that works).
Even this is very relevant. However, I would like to formulate my
objections.
I do not deeply know Unix or FFS internals, so I can not give a technical
reason, "from the inside", to justify the usefulness of birthtime.
I assume instead the perspective of a user. The filesystem is therefore a
tool, which provides some facilities and some information, without
"evaluating" them. The user is the ultimate discriminating factor, which
determines if some information is useful or not. Of course, this is a
debatable opinion and maybe this a first difference in our approaches.
First, the definition:
> [Aside: the current definition is that the birthtime is the minimum (ie:
> earliest) of all values ever assigned to the mtime field of the inode that
> represents the file. Feel free to pick a different definition if you can
> find a use for the field however.]
Yes, I agree. But I assume this definition as a consequence of the following
one: the `birthtime' of a file is the time when this file is created, ever.
This should not be dependent on the filesystem. A file may be created in a
filesystem and then moved, copied, or modified.
Yes, one can object that when a file is copied, it actually becomes another
file, so the birthtime definition in this case is ambiguous. I'll keep
considering the birthtime as the one of the original file, which should be
preserved by its copy (this is arbitrary, I know).
> If you can't show a use for birthtime which can actually be made to
> work, and work properly, all the time (where implemented - that it fails to
> work if a file is copied to a filesystem which has no concept of birthtime
> is obviously not relevant) - an unreliable field is no use, then I think
> you'd have to agree that it is useless.
`birthtime' of a file represents a kind of information, which Last
Modified time can not keep.
> We'll wait to determine that until after you show a use. Note however that
> I said useless, not meaningless. Birthtime certainly has a defined meaning,
> I simply cannot find any use for a field defined that way. Or any other
> way I have ever considered (which could rationally be called birth time).
Consider a configuration file. Assume that it has been created 10 years ago,
when the company was running Linux. 5 years ago, the company switched to NetBSD.
You are a new employee and you just discovered that this configuration file has
odd behaviours. If you are able to know that this file has been created during
the "Linux epoch", you can immediately suspect about the Linux syntax being
responsible these problems.
If you only see the Last Modification time, which may be last month, the
reason for this inconvenient will be harder (and slower) to be determined.
This may also be subject to a script: all the files whose birthtime is
lower than `some date' must be subject to this string substitution. A
silly example: `uname' instead of `lsb_release'.
I had a very similar issue related to file encoding: a file created on
Windows with ISO-8859-1 was not properly readable on BSD. Being able to
know the file birthtime helped to know the original file was created
on Windows, and therefore its original encoding.
> One more thing... there are a vast number of other data items, some of
[...]
> I could ask you to also justify your proposed birthtime use as being more
> useful than all the other (useful) ones ... but I won't even ask for that,
> just some practical and implementable use.
`birthtime' is a human useful information, which may be supportive to
determine some features of the file and to better identify is origin. It's
important whether the file is a document, a configuration file, a photo,
or a song.
> kre
Rocky
Home |
Main Index |
Thread Index |
Old Index