From: "Martin Langhoff" <martin.langhoff@gmail.com>
To: "Martin Langhoff" <martin.langhoff@gmail.com>,
"Mike Hommey" <mh@glandium.org>,
"Wayne Davison" <wayne@opencoder.net>,
"Andreas Ericsson" <ae@op5.se>,
git@vger.kernel.org
Subject: Re: preserving mtime
Date: Mon, 19 Nov 2007 09:36:52 +1300 [thread overview]
Message-ID: <46a038f90711181236o1acd00d4id9c5aeffd3065b80@mail.gmail.com> (raw)
In-Reply-To: <20071118184724.GA494@old.davidb.org>
On Nov 19, 2007 7:47 AM, David Brown <git@davidb.org> wrote:
> On Sun, Nov 18, 2007 at 10:34:55PM +1300, Martin Langhoff wrote:
>
> >I do hope anyone doing those things is _very_ aware that the mtime
> >metadata has a specific meaning -- when did this specific file in this
> >filesystem last change -- and is used by many tools in that sense. You
> >are trying to use it for something else. Lots of things will break.
> >
> >Like incremental backups, for example.
>
> 'mtime' does _not_ have the specific meaning of 'when did this specific
> file last change'. That is the 'ctime' field. 'mtime' is also updated
> when a file is modified, but can be changed by the user. Many utilities
> restore mtime to older values, including tar.
Hmmm. After a bit of googling I've found conflicting descriptions of
the mtime/ctime semantics (I thought - for 10 years now - that ctime
was "creation time", it is "changed time"). Some people think that
anything that updates mtime also updates ctime, and others say the
opposite.
Wikipedia says (at http://en.wikipedia.org/wiki/MAC_times and
http://en.wikipedia.org/wiki/Stat_%28Unix%29 ) that mtime is about the
content, and ctime about metadata (owner, permissions, moved inode,
etc). Changes in content "touch" mtime + ctime.
With that in mind, I think it makes sense for things like make and
amanda to read mtime as referring to a real change of that concrete
file. The abstract notion of the file having changed in the big DSCM
in the sky is useful, but putting that data in mtime messes things up.
> However, it will make 'make' very confusing, since it uses the mtime to
> determine if files are out of date. If moving to an older version of a
> file causes the file to become older, make won't recompile. This is
> arguably a defect in make, but that is how it works.
It's not a bug in make. mtime has a definite meaning, and make is
using that meaning. Same with amanda.
cheers,
m
next prev parent reply other threads:[~2007-11-18 20:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-16 9:33 preserving mtime Fabrizio Pollastri
2007-11-16 10:15 ` Andreas Ericsson
2007-11-17 18:22 ` Wayne Davison
2007-11-18 8:45 ` Mike Hommey
2007-11-18 9:34 ` Martin Langhoff
2007-11-18 18:47 ` David Brown
2007-11-18 20:36 ` Martin Langhoff [this message]
2007-11-18 21:44 ` David Brown
2007-11-18 9:40 ` Jan Hudec
2007-11-18 10:42 ` Robin Rosenberg
2007-11-19 14:38 ` Johannes Schindelin
2007-11-16 10:19 ` Jakub Narebski
2007-11-16 10:21 ` Junio C Hamano
2007-11-16 12:09 ` Erik Warendorph
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=46a038f90711181236o1acd00d4id9c5aeffd3065b80@mail.gmail.com \
--to=martin.langhoff@gmail.com \
--cc=ae@op5.se \
--cc=git@vger.kernel.org \
--cc=mh@glandium.org \
--cc=wayne@opencoder.net \
/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;
as well as URLs for NNTP newsgroup(s).