Hello all,
Starting in Linux kernel 2.6.8, there is support for opening files with
a O_NOATIME flag. Opening files in this way avoids changing their atime.
Note that you must be root or the owner of the file to do this. Also,
this is only supported on certain filesystems -- NFS, for instance, has
the server check atimes.
We should support this feature in tar. One way is to modify
--atime-preserve so that, when running on a platform/filesystem that
supports O_NOATIME, we avoid changing the ctime. But I think
--atime-preserve has a lot of side-effects that make it severely
different from O_NOATIME; in particular, you would never want to use
--atime-preserve with incremental backups.
So I suggest the best way is to add a new option --noatime, which opens
files with O_NOATIME if that is supported, and opens files without
--noatime if it is not supported. For bonus points, you could have the
option of combining --noatime and --atime-preserve, so that tar would
fall back to --atime-preserve if O_NOATIME was not supported. But it
might be difficult to check if O_NOATIME is effective on a particular file.
I'm happy to code this patch, but thought I'd check in with the tar
folks first.
Cheers,
--Ian Turner
_______________________________________________
Bug-tar mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-tar