bug-tar
[Top][All Lists]
Advanced

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

[Bug-tar] Re: O_NOATIME patch status


From: Paul Eggert
Subject: [Bug-tar] Re: O_NOATIME patch status
Date: Wed, 30 Nov 2005 16:21:58 -0800
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Thanks for checking that.  Some comments:

> -Though this option should work on recent Linux kernel versions, it is
> -not reliable on other platforms.  To preserve the access time reliably
> -on those platforms, you can mount the file system read-only, or access
> -the file system via a read-only loopback mount, or use the
> address@hidden mount option available on some systems.  However,
> -mounting typically requires superuser privileges and can be a pain to
> -manage, so the @option{--atime-preserve} option can be useful despite
> -its glitches on other platforms.

Don't you think this advice is useful?  I'd rather keep it around somewhere,
if it is useful.  Perhaps later in the section (please see below).

> address@hidden remembers the access time of a file
> address@hidden (the default)
> +remembers the access time of a file

Since the default might change, I'd rather not highlight it now.

> address@hidden avoids changing time stamps in the
> +first place on files, so it doesn't interfere with time stamp updates
> +caused by other programs. It has no problems with incremental backups, but 
> only works on regular files (not directories).

It should work on directories too.  At least, that's how I tried to write
the code.  I see the wording was in the old version though.

I installed the following patch.

2005-11-30  Paul Eggert  <address@hidden>

        * doc/tar.texi (Option Summary): Rewrite the
        --atime-preserve=system description in response to Ian Turner's
        proposed patch.

2005-11-30  Ian Turner  <address@hidden>

        * doc/tar.texi (Extracting Specific Files): Remove obsolescent
        FIXME.

--- doc/tar.texi        29 Nov 2005 19:14:21 -0000      1.77
+++ doc/tar.texi        1 Dec 2005 00:18:05 -0000       1.78
@@ -1470,11 +1470,8 @@ To extract specific archive members, giv
 arguments, as printed by @value{op-list}.  If you had mistakenly deleted
 one of the files you had placed in the archive @file{collection.tar}
 earlier (say, @file{blues}), you can extract it from the archive without
-changing the archive's structure.  It will be identical to the original
-file @file{blues} that you deleted.  @FIXME{At the time of this
-writing, atime and ctime are not restored.  Since this is a tutorial
-for a beginning user, it should hardly be mentioned here.  Maybe in
-a footnote?  --gray}.
+changing the archive's structure.  Its contents will be identical to the
+original file @file{blues} that you deleted.
 
 First, make sure you are in the @file{practice} directory, and list the
 files in the directory.  Now, delete the file, @samp{blues}, and list
@@ -2221,15 +2218,6 @@ Attempt to preserve the access time of f
 option currently is effective only on files that you own, unless you
 have superuser privileges.
 
-Though this option should work on recent Linux kernel versions, it is
-not reliable on other platforms.  To preserve the access time reliably
-on those platforms, you can mount the file system read-only, or access
-the file system via a read-only loopback mount, or use the
address@hidden mount option available on some systems.  However,
-mounting typically requires superuser privileges and can be a pain to
-manage, so the @option{--atime-preserve} option can be useful despite
-its glitches on other platforms.
-
 @value{op-atime-preserve-replace} remembers the access time of a file
 before reading it, and then restores the access time afterwards.  This
 may cause problems if other programs are reading the file at the same
@@ -2242,23 +2230,31 @@ conditions.)  Worse, on most platforms r
 updates the status change time, which means that this option is
 incompatible with incremental backups.
 
address@hidden avoids changing time stamps on files
-other than directories, without interfering with time stamp updates
address@hidden avoids changing time stamps on files,
+without interfering with time stamp updates
 caused by other programs, so it works better with incremental backups.
 However, it requires a special @code{O_NOATIME} option from the
-underlying operating and file system implementation, and it requires
+underlying operating and file system implementation, and it also requires
 that searching directories does not update their access times.  As of
-this writing (November 2005) this works only in a few new Linux
-kernels.  Worse, there is currently no reliable way to know whether
-the features actually work.  Sometimes @command{tar} knows for sure
-that the features are not working, so it will complain and exit right
-away if you try to use @value{op-atime-preserve-system}; but other
-times @command{tar} might think that the option is supported when it
-is not actually working.
+this writing (November 2005) this works only with Linux, and only with
+Linux kernels 2.6.8 and later.  Worse, there is currently no reliable
+way to know whether this feature actually works.  Sometimes
address@hidden knows that it does not work, and if you use
address@hidden then @command{tar} complains and
+exits right away.  But other times @command{tar} might think that the
+option works when it actually does not.
 
 Currently @option{--atime-preserve} with no operand defaults to
 @value{op-atime-preserve-replace}, but this may change in the future
 as support for @value{op-atime-preserve-system} improves.
+
+If your operating system does not support
address@hidden, you might be able to preserve access
+times reliably by by using the @command{mount} command.  For example,
+you can mount the file system read-only, or access the file system via
+a read-only loopback mount, or use the @samp{noatime} mount option
+available on some systems.  However, mounting typically requires
+superuser privileges and can be a pain to manage.
 
 @item address@hidden
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]