Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Mar 2016 21:24:55 +0000
From:      Steven Hartland <killing@multiplay.co.uk>
To:        freebsd-fs@freebsd.org
Subject:   Re: zfs and st_nlink limit at 32767
Message-ID:  <56DB4EA7.7050002@multiplay.co.uk>
In-Reply-To: <56DB377F.9020205@fsn.hu>
References:  <56DB377F.9020205@fsn.hu>

next in thread | previous in thread | raw e-mail | index | archive | help
Correct stat st_nlink is a nlink_t which is defined as uint16_t, its not 
clear why its clamping at what looks like int16_t max.

It looks like the kernel version in nstat is a uint32_t so internally it 
should be correct.

You may have some joy changing it to uint32_t but is likely everything 
will rebuilding and even then there may be some edge cases which break 
one that sticks out is linux compat support which doesn't use nlink_t.

     Regards
     Steve

On 05/03/2016 19:46, Nagy, Attila wrote:
> 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@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-fs
> To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org"




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?56DB4EA7.7050002>