From owner-freebsd-questions Mon Apr 12 19:57:27 1999 Delivered-To: freebsd-questions@freebsd.org Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (Postfix) with ESMTP id 919181564C for ; Mon, 12 Apr 1999 19:57:21 -0700 (PDT) (envelope-from grog@freebie.lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.9.1/8.9.0) with ESMTP id MAA13559; Tue, 13 Apr 1999 12:25:01 +0930 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.9.3/8.9.0) id MAA74347; Tue, 13 Apr 1999 12:25:00 +0930 (CST) Message-ID: <19990413122500.D74226@lemis.com> Date: Tue, 13 Apr 1999 12:25:00 +0930 From: Greg Lehey To: Christopher Palmer Cc: "Randy A. Katz" , questions@FreeBSD.ORG Subject: Re: Too many links References: <19990412121738.I2142@lemis.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.2i In-Reply-To: ; from Christopher Palmer on Mon, Apr 12, 1999 at 02:56:08PM -0500 WWW-Home-Page: http://www.lemis.com/~grog Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Monday, 12 April 1999 at 14:56:08 -0500, Christopher Palmer wrote: > On Mon, 12 Apr 1999, Greg Lehey wrote: > >> Seriously, it's a performance issue. The current limit is in >> /usr/include/sys/syslimits.h: >> >> #define LINK_MAX 32767 /* max file link count */ >> >> Theoretically you could just increase this value and 'make world', but >> you might run into int overflow problems. I certainly think that >> there are better alternatives to this issue than adding yet more >> directories to one which is too full already. > > Yikes! Is this a filesystem-wide limit (not more than 32767 files/dirs > total) or a directory-specific limitation (not more than 32767 files/dirs > per dir)? This is a per-file limit. A directory is just a special kind of file. Note that System V has a *much* lower limit (1000, IIRC). > Basically, is this a limit on inodes? No, it has nothing to do with inode limitations. It's the number of directory entries which are allowed to point to a single inode. Recall that any directory (even /) has an entry .., which points to the parent directory (or to / in the case of /..). This is a link to the directory, and it's the reason for the current problems. The link count is really an inode usage count: when you remove a link, you need to know if you have removed the last one. In this case you remove the inode as well. Greg -- See complete headers for address, home page and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message