On Monday 12 October 2009, jim owens wrote:
> Pär Andersson wrote:
> > I just ran into the max hard link per directory limit, and remembered
> > this thread. I get EMLINK when trying to create more than 311 (not 272)
> > links in a directory, so at least the BUG() is fixed.
> > 
> > What is the reason for the limit, and is there any chance of increasing
> > it to something more reasonable as Mikhail suggested?
> > 
> > For comparison I tried to create 200k hardlinks to the the same file in
> > the same directory on btrfs, ext4, reiserfs and xfs:
> 
> what real-world application uses and needs this many hard links?
> 
> jim

For me 311 "hard link to the same file under the same directory" limit is not 
so high.
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.

$ find /usr/bin/ -type l | wc -l
478

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.

$ ls -ld /usr/share/doc
drwxr-xr-x 2828 root root 12288 2009-08-20 19:03 /usr/share/doc
$ ls -ld /usr/share/* | egrep "^d" | wc -l
2826

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.

BR
Goffredo

-- 
gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) <kreijackATinwind.it>
Key fingerprint = 4769 7E51 5293 D36C 814E  C054 BF04 F161 3DC5 0512
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to