[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-tar] bug in 'file has changed as we read it'
From: |
Michal Svoboda |
Subject: |
Re: [Bug-tar] bug in 'file has changed as we read it' |
Date: |
Mon, 13 Sep 2010 19:35:24 +0200 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
Paul Eggert wrote:
> There are applications where it's important that the metadata be
> consistent with the data: for example, it could be that the data
> contain time stamps, which should always predate the ctime, and
> if the tar image contains data with timestamps after the ctime,
> then the tar image is inconsistent.
How can this happen without modifying the data?
I'm thinking this scenario
1) Meta-data have ctime 100, data have timestamp 99.
2) You change meta-data, ctime will always RAISE.
3) It doesn't matter if you store new or old ctime, data timestamp will
be older.
Maybe there can be a problem if someone forcibly changes the ctime to 98.
Then the easy solution (even wrt tar format) is to just always include
the *old* meta-data and throw away the change. That way you'll still have
a good backup.
Key point here is that AFAIK stat() is atomic so you can't have a
'half-modified' meta-data just as you have with real data. I dont know
how far this goes with xattrs and such.
> Perhaps an option could be added to tar to selectively control
> the seriousness of each warning; that should address the problem.
That would be OK if it would be
1) fine grained to distinguish mtime vs. ctime changes
2) settable indirectly, eg. via environment, because you don't always
have full control over tar invocation (unless you wanna go the wrapper
way)
Michal Svoboda
- [Bug-tar] bug in 'file has changed as we read it', Michal Svoboda, 2010/09/09
- Re: [Bug-tar] bug in 'file has changed as we read it', Eric Blake, 2010/09/09
- Re: [Bug-tar] bug in 'file has changed as we read it', Michal Svoboda, 2010/09/10
- Re: [Bug-tar] bug in 'file has changed as we read it', Dustin J. Mitchell, 2010/09/11
- Re: [Bug-tar] bug in 'file has changed as we read it', Michal Svoboda, 2010/09/13
- Re: [Bug-tar] bug in 'file has changed as we read it', Joerg Schilling, 2010/09/13
- Re: [Bug-tar] bug in 'file has changed as we read it', Paul Eggert, 2010/09/13
- Re: [Bug-tar] bug in 'file has changed as we read it',
Michal Svoboda <=
- Re: [Bug-tar] bug in 'file has changed as we read it', Paul Eggert, 2010/09/13
- Re: [Bug-tar] bug in 'file has changed as we read it', Michal Svoboda, 2010/09/13
- Re: [Bug-tar] bug in 'file has changed as we read it', Sergey Poznyakoff, 2010/09/13