Date: Fri, 25 Mar 2005 22:10:18 -0500 From: David Schultz <das@FreeBSD.ORG> To: David Malone <dwmalone@maths.tcd.ie> Cc: freebsd-fs@FreeBSD.ORG Subject: Re: UFS Subdirectory limit. Message-ID: <20050326031018.GB41481@VARK.MIT.EDU> In-Reply-To: <200503260011.aa53448@salmon.maths.tcd.ie> References: <200503260011.aa53448@salmon.maths.tcd.ie>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Mar 26, 2005, David Malone wrote: > There was a discussion on comp.unix.bsd.freebsd.misc about two weeks > ago, where someone had an application that used about 150K > subdirectories of a single directory. They wanted to move this > application to FreeBSD, but discovered that UFS is limited to 32K > subdirectories, because UFS's link count field is a signed 16 bit > quantity. Rewriting the application wasn't an option for them. > > I had a look at how hard it would be to fix this. The obvious route > of increasing the size of the link count field is trickly because > it means changing the struct stat, which has a 16 bit link count > field. This would imply ABI breakage, though it might be worth it. Why not just... - make a new st_nlink field that's 32 bits and put it in the spare 32-bit field in struct stat - rename the old st_nlink to st_onlink and leave it at 16 bits - the kernel would fill in st_onlink with max(st_nlink,SHORT_MAX)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050326031018.GB41481>