DragonFly kernel List (threaded) for 2003-09
Re: cache_lookup() work this week.
On Wed, 3 Sep 2003 23:55:01 -0700 (PDT)
Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx> wrote:
> It's very easy to find loops. All the program has to do is
> record the (rdev,inode#) for each directory element in the path
> as it recurses. Only the (rdev,inode#) for the elements
> representing the current path need to be remembered so the memory
> use is small. e.g.:
> In this case d[1,55] is a hardlink to b. find, rm, whatever would
> see that the identifying information [1,55] is the same as for b
> which is still in its path and not recurse through it.
> It is an easy trick to implement.
Yes. But the problem is that there are umpteen dozen dozen programs
which take an -R flag or otherwise traverse directory trees, which would
have to be patched. It would be a big job, no matter how simple the
change is, so I think it would be better to address it somewhere in the
Just because you can do something doesn't mean you necessarily should...
what's the value of hardlinking a directory to one of its parent
directories? Where would this be useful?