Re: Mass-Hardlinking Oops

jim owens
2009-10-12T18:07:22Z

Goffredo Baroncelli wrote:
> I don't know a software which need so many hard links. But it easy to find
> some similar cases.
>
> For example under my "/usr/bin" I have 478 _"soft links"_ to _different_
> files.

Hard link is not used in place of soft link... soft link is
a different and preferred addition to posix style systems.

So don't think we need more hard links just because you find
apps using soft links.

> When a directory is created, its ".." entry is a hard link to the "parent"
> directory. For example the /usr/share/doc directory has 2828 "hard links"
> because it has 2826 children directories.

Max subdirectories per directory is again a different feature.

btrfs does not use "hard link count" for subdirectories.

That association of "hard links-2" == "max subdirs" is only a legacy
of the design of some filesystems such as UFS.

> These cases are different cases. But the 311 "hard link to the same file under
> the same directory" limit may be too strong. Not now but in the next format
> change I think that it would be useful to remove this limit.

I would agree if the cost was 0, but it increases a field size so
it would be nice to have a justified need. But it is Chris's call.

jim