zfs and st_nlink limit at 32767

Nagy, Attila bra at fsn.hu
Sat Mar 5 21:44:05 UTC 2016


You mean a (signed) short.
I haven't taken a look into the code, it may be from simple to difficult.

UFS's (on disk) data structure is where this limit comes from, of course 
that must not change, but for other file systems (like zfs), this could 
be raised to an ulong in upper layers.
And there would be some conversion needed, which may not be desireable.

On 03/05/16 22:23, Sami Halabi wrote:
>
> it seems an integer limit (32bit).. I guess easily to fix by 
> converting to unsigned int / 64 bit.
>
> sami
>
> בתאריך 5 במרץ 2016 9:54 PM,‏ "Nagy, Attila" <bra at fsn.hu 
> <mailto:bra at fsn.hu>> כתב:
>
>     Hi,
>
>     If I create a million hard links to a file, stat -s says it has 32767:
>     $ stat -s 900402.24.t
>     st_dev=1709683738 st_ino=719745 st_mode=0100644 st_nlink=32767
>     st_uid=1001 st_gid=0 st_rdev=4294967295 st_size=81688
>     st_atime=1455881393 st_mtime=1455881393 st_ctime=1457206643
>     st_birthtime=1457206536 st_blksize=81920 st_blocks=67 st_flags=2048
>
>     Is this a limitation somewhere which is hard to remove, or just an
>     easily fixable "legacy" from the times, when all filesystems
>     contained this limit?
>     _______________________________________________
>     freebsd-fs at freebsd.org <mailto:freebsd-fs at freebsd.org> mailing list
>     https://lists.freebsd.org/mailman/listinfo/freebsd-fs
>     To unsubscribe, send any mail to
>     "freebsd-fs-unsubscribe at freebsd.org
>     <mailto:freebsd-fs-unsubscribe at freebsd.org>"
>



More information about the freebsd-fs mailing list