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
