Reason for LINK_MAX set to 32K?

Dan Nelson dnelson at allantgroup.com
Fri Mar 5 07:23:06 PST 2004


In the last episode (Mar 04), Stephen J. Roznowski said:
> Is there a technical reason why LINK_MAX is set to 32K? Would
> anything bad happen if this value was raised?

Mainly because di_nlink is an int16_t in ufs/dinode.h and ufs/inode.h. 
I think it could have been bumped up to an int32_t in UFS2, but it's
probably too late now.  You might be able to change it to a uint16_t to
raise the limit to 64K, but I don't know if the kernel ever relies on a
negative link count at any time.

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-hackers mailing list