LWN.net Logo

Re: puzzled

Re: puzzled

Posted Sep 2, 2004 17:23 UTC (Thu) by larryr (guest, #4030)
In reply to: puzzled by fergal
Parent article: More notes on reiser4

I think maybe the problem is that unix style filesystem semantics assume a tree structure, meaning one parent edge/entry for each vertex/node, but having a hard link to a directory violates that assumption. I think if it was considered typical for a directory to have multiple parent pointers, and there were consistent conventions for performing atomic locking on all the parents of a directory at once, there might be no problem. But if "the parent" of a node is assumed by the implementation to be "the node corresponding to the path component to the left of the path component referencing this node", locking "the parent" of "/x/a/dir1" could be different from locking "the parent" of "/x/b/dir1".

Larry


(Log in to post comments)

Re: puzzled

Posted Sep 3, 2004 1:57 UTC (Fri) by vonbrand (subscriber, #4458) [Link]

No, the problem is precisely that if a diretory has several parents, you need to make sure nobody messes around with one of the paths while you are screwing up another one. For that you'd have to be able to find all parents and lock them before doing anything... and that will have a heavy cost if done naïvely. Al (and Linus) is asking how do they solve these problems. If the ReiserFS guys have good answers, symlinks (as second-class citizens) could be on the way out. I for one doubt they have the answers (or are able to come up with them). Time will tell.

Re: puzzled

Posted Sep 3, 2004 15:36 UTC (Fri) by larryr (guest, #4030) [Link]

No, the problem is precisely that if a diretory has several parents[... ]you'd have to be able to find all parents and lock them before doing anything... and that will have a heavy cost if done naïvely.

I wrote:

if it was considered typical for a directory to have multiple parent pointers, and there were consistent conventions for performing atomic locking on all the parents of a directory at once, there might be no problem.

Larry

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds