From owner-freebsd-hackers Sat Sep 16 13:49:59 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id 5564A37B422; Sat, 16 Sep 2000 13:49:57 -0700 (PDT) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 16 Sep 2000 21:49:56 +0100 (BST) Date: Sat, 16 Sep 2000 21:49:55 +0100 From: David Malone To: John DeBoskey Cc: freebsd-hackers@FreeBSD.org Subject: Re: > 32k directories in a directory Message-ID: <20000916214955.A71692@walton.maths.tcd.ie> References: <20000916150606.A77687@unx.sas.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20000916150606.A77687@unx.sas.com>; from jwd@FreeBSD.org on Sat, Sep 16, 2000 at 03:06:06PM -0400 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, Sep 16, 2000 at 03:06:06PM -0400, John DeBoskey wrote: > #define LINK_MAX 32767 /* max file link count */ Looking at /usr/include/ufs/ufs/dinode.h, which seems to describe the format of the on-disk inode I see that di_nlink is a int16_t, for which the largest positive value is 32767. If you try increasing this things will almost certainly blow up. > Has anyone built a system which can support > 32k dirs in > a dir, or have any ideas what is involved? You really don't want to have a directory with 32K entries on a UFS filesystem - it will be painfully slow and inefficient. I've tried to clean up a news filesystem which had directories with large numbers of entries and you can only delete entries once every few seconds - in the end I unmounted the filesystem, clried the directory and fscked. David. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message