Re: Mass-Hardlinking Oops

Pär Andersson
2009-10-11T15:05:53Z

[-- Attachment #1: Type: text/plain, Size: 913 bytes --]

Mikhail Raskin <raskin@mccme.ru> writes:

> On Mon, 3 Aug 2009, Tomasz Chmielewski wrote:
>> BTW, what limit is that?
>
> 272 links. Creating 273-th link causes BUG(). The limit seems so
> arbitrary that it maybe can be made higher.. 32-bit (billions of
> links) seem totally unrestrictive..

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:

fs limit
-- -----
btrfs 311
reiser 64535
ext4 65000
xfs higher than 200000, if there is a limit

Regards,
Pär Andersson

[-- Attachment #2: Type: application/pgp-signature, Size: 196 bytes --]