Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Sep 2000 21:49:55 +0100
From:      David Malone <dwmalone@maths.tcd.ie>
To:        John DeBoskey <jwd@FreeBSD.org>
Cc:        freebsd-hackers@FreeBSD.org
Subject:   Re: > 32k directories in a directory
Message-ID:  <20000916214955.A71692@walton.maths.tcd.ie>
In-Reply-To: <20000916150606.A77687@unx.sas.com>; from jwd@FreeBSD.org on Sat, Sep 16, 2000 at 03:06:06PM -0400
References:  <20000916150606.A77687@unx.sas.com>

next in thread | previous in thread | raw e-mail | index | archive | help

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




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