bug-tar
[Top][All Lists]
Advanced

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

Re: [Bug-tar] [PATCH] tar: Ignore certain file status changes on create


From: Paul Eggert
Subject: Re: [Bug-tar] [PATCH] tar: Ignore certain file status changes on create
Date: Sat, 14 May 2011 01:44:44 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10

On 05/12/11 20:04, Robert Morell wrote:
> this updates the "file
> changed" logic to explicitly check the file status fields that tar
> actually cares about, and ignore the problematic ones that it doesn't.

Unfortunately that won't work in general, since it's possible that
the file was removed and recreated, with the same inode number as
before.  Checking the ctime catches this situation.  Ignoring the
ctime would miss it.  This is a common strategy among archiving
programs.

Arguably POSIX allows a kernel to change the timestamp of a file
whenever it pleases.  That does not mean it's a good idea.

Perhaps instead of modifying the programs that look at time
stamps, you could fix 'ld' so that it does an msync with MS_ASYNC
before it exits?  If what that mailing list says is correct, that
should fix the problem for programs like 'tar' that look at ctime.



reply via email to

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