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

Re: Bug#2828: Horrible aliasing problem (was xosview)

ian@chiark.chu.cam.ac.uk (Ian Jackson)  wrote on 30.04.96 in <m0uENu8-0002ZFC@chiark.chu.cam.ac.uk>:

> Aaaaaaarrgh !  The classic pointer-aliasing problem strikes
> filesystems ...
> Suggestions and/or sympathy welcome.

Just some random thoughts on the problem.

First, we can partition this in two sub-problems:

A. (At least one of) the directories is a symlink. The file isn't.
B. The file is a symlink.

(Of course, both possibilities go for both old and new file.)

B should be somewhat more easy; you know a file's a symlink when you  
install it, and it ought not to change, and there's not much reason for  
system admins to change it.

So A is the problem here.

Maybe you could only check the directory components, and make sure that  
you check each component only once. That ought to have much better  
performance than checking every file, but is much harder to do.

Second, an obvious (but, from earlier comments from you, not very  
attractive) way would be md5sums on every file.

Third, in the case that triggered this, dpkg was removing a file it just  
installed, wasn't it? This case could certainly be solved by keeping  
device/inode numbers during the install only.

Fourth, this is probably the exact reason mirror doesn't handle symlink- 
directory changes well.

Hmm. I tend to think the check-directory-components thing is the best bet  

MfG Kai

Reply to: