bug-tar
[Top][All Lists]
Advanced

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

Re: [Bug-tar] spurious "file changed as we read it" error


From: Helmut Waitzmann
Subject: Re: [Bug-tar] spurious "file changed as we read it" error
Date: Fri, 03 Aug 2007 22:13:10 +0200
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Egmont Koblinger <address@hidden> writes:

>However, under Linux, in some special circumstances ctime of a
>file changes when the kernel syncs that file to the disk, despite that its
>contents or meta-data is not modified by any processes.
>
>Please read this mail I posted to the linux kernel mailing list yesterday
>for a detailed discussion. (No answer yet, but it may change; you might even
>want to join this thread.)
>
>http://marc.info/?l=linux-kernel&m=118599089926466
>
>I don't know if the kernel's behavior is okay or it is a kernel bug.

I think, it's a kernel bug.  Whether an inode is synced to disk or not
should make no difference for the application program's point of view.

As a workaround, you could use a shellscript "/usr/local/bin/tar"

   #!/bin/sh
   sync
   exec /bin/tar "$@"

to reduce the probability of this bug to occur.

>Anyway, I suggest that tar could probably watch for mtime instead of ctime.
>It seems to me more logical since I guess tar tries to protect against
>archiving inconsistent files, which means that we should protect against
>changing content, and not changing meta-info during archiving.

GNU tar maintainers, if you change GNU tar's behavior, then, please, do
it by providing an option to switch this new behavior on (and perhaps, an
option to switch it off again), not by changing its default behavior.

Then someone who wants that new behavior to be the default could put that
option into the environment variable "TAR_OPTIONS".
-- 
Wer mir E-Mail schreiben will, stelle   | When writing me e-mail, please
bitte vor meine E-Mail-Adresse meinen   | precede my e-mail address with
Vor- und Nachnamen, etwa so:            | my full name, like
Helmut Waitzmann <address@hidden>, (Helmut Waitzmann) address@hidden




reply via email to

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