tech-kern archive

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

Re: multiple vnodes for same file?



On Mon, Jul 09, 2012 at 06:10:14AM +0000, Emmanuel Dreyfus wrote:
 > Here is an example on which I stuggle right now:
 > - lookup a in /
 > - lookup b in a
 > - reclaim a
 > - lookup .. in b
 >   -> this is a, but I forgot its name. I also have a problem to reference its
 >      parent.
 > - lookup a  in /
 >   -> now I must reconnect b/.. and /a since they are the same node.
 > 
 > That suggests that each time I lookup a node, I must walk all nodes
 > known to perfused to check that it was not already known with same
 > inode, but with another name (e.g.: "b" vs ".."). I must also modify
 > the parent when reconnecting ".." to a named node.

I don't know what the data structures involved look like, but what you
say suggests they're wrong. "a" and "b/.." have the same inode number,
and you should therefore naturally get the same object back from
lookup.

 > Another approach could be to refrain the kernel from reclaiming vnodes
 > that still have children. It seems much simplier.

That is a can of worms.

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index