|
|
Subscribe / Log in / New account

More notes on reiser4

More notes on reiser4

Posted Sep 2, 2004 13:58 UTC (Thu) by ballombe (subscriber, #9523)
Parent article: More notes on reiser4

Aren't '.' and '..' the canonical example of hard link to directory ?
How does the kernel handle locking for those two case ?


to post comments

More notes on reiser4

Posted Sep 2, 2004 15:54 UTC (Thu) by RobSeace (subscriber, #4435) [Link]

Yeah, but those two are easily recognized, and can be special-cased, if
necessary... Basically, the only issue with those is first canonicalizing
your pathname (a la realpath()), and then names will be the same, no matter
what combinations of "." and ".." you use to reach the real destination...
However, with arbitrarily named hard-links, you don't have the ability to
recognize them... Or, rather, I should say you don't have the ability to
canonicalize them into any single specific format, since there is no "one
true name" for them... Ie: if you have "X" and "Y" as hard-links to the
same exact file, which one is the canonical name?? There's no way to decide
that... But, since everyone knows about the special cases of "." and "..",
those can be handled specially, with little trouble...

More notes on reiser4

Posted Sep 11, 2004 15:57 UTC (Sat) by khim (subscriber, #9252) [Link]

Simple. It mostly ignores them when they are in present on disk (some filesystems do not even have "." and ".." on disk!) and handles them specially when in memory.


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