Re: FS: hardlinks on directories

Helge Hafting
2003-08-24T18:55:09Z

On Sun, Aug 24, 2003 at 09:35:57PM +0400, Hans Reiser wrote:
> Helge Hafting wrote:
> >
> So, he needs links that count as references,
Plain hard links.

> links that don't count as
> references but disappear if the object disappears (without dangling like
> symlinks),

Current filesystems would need a fs-wide search for soft links,
but this is avoidable by storing a list of links in the inode.
That must be done carefully though, or you'll get another
problem: if I move a high-level directory, will I have
to update links and inodes linked to
that exists deep within some subsubsubdirectory?
This had better be unnecessary, meaning the in-inode list
of "reverse links" can't contain paths.
Perhaps the can contain the inode numbers of the referencing directories.

Deleting a file with this new kind of links will then cause
searches in various directories containing those links.

> and unlinkall(), which removes an object and all of its
> links. He needs for the first reference to a directory to be removable
> only by removing all links to the object, or designating another link to
> be the "first" reference.
>
> Sounds clean to me. This is not to say that I am funded to write
> it.;-) I'd look at a patch though.....;-)
>
> I need to write up a taxonomy of links..... after reiser4 ships.....
>

This stuff is possible if we get a new type of link then.
I wonder how exisitng link-aware tools will cope.

Helge Hafting