Re: preserving mtime

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Any competent backup program would use 'ctime' for incremental backups,
unless they don't mind missing a vast majority of files on many machines.

The main thing I've seen mess up backup software is if the mtime is set
into the future.

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.

Preserving mtime definitely should not be a default.

David
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux