DragonFly kernel List (threaded) for 2003-09
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: cache_lookup() work this week.
: How do tree walking programs resolve cycles created by hardlinking
: directories.
:
: ie. ln /tmp /tmp/recurse; rm -rf /tmp/*
It's fairly easy to teach something like rm about cycles, it need only
record the inode number for the directory path it maintains while
removing the files. But it's probably safer to disallow cyclic links
or, at least, the initial creation of a cyclic link.
A directory hardlink can very usefully replace what people use nullfs
mounts for now, as well as other things.
:> (B) it will be possible to implement semi-hard links,
:> basically softlinks that *look* like hardlinks and
:
: Look like hardlinks to whom?
:
:-billy
Normal hardlinks cannot cross mount boundaries. Softlinks can, but if you
cd into a softlinked directory and then cd .. the path information is
lost (unless you use something like the tcsh feature which makes its
built-in cd remember it). So a semi-hard link is basically going to be
a softlink that is able to cross a mount boundary and otherwise acts
and feels like a hard link if you CD into it or use it as part of
a path. /var/tmp would be a good example. e.g. if /var/tmp is a
semi-hard link to /tmp a path like /var/tmp/.. would yield "/var" rather
then "/" if it were a softlink.
-Matt
Matthew Dillon
<dillon@xxxxxxxxxxxxx>
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]