From owner-freebsd-questions Sun Jun 20 21:42:40 1999 Delivered-To: freebsd-questions@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id 85A5614D4C for ; Sun, 20 Jun 1999 21:42:37 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.9.3/8.9.3) id XAA07102; Sun, 20 Jun 1999 23:42:32 -0500 (CDT) (envelope-from dan) Date: Sun, 20 Jun 1999 23:42:32 -0500 From: Dan Nelson To: Yusuf Goolamabbas Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Maximum number of subdirs which can be created in a dir ? Message-ID: <19990620234232.A6655@dan.emsphone.com> References: <19990621035041.2682.qmail@yusufg.portal2.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.6i In-Reply-To: <19990621035041.2682.qmail@yusufg.portal2.com>; from "Yusuf Goolamabbas" on Mon Jun 21 03:50:41 GMT 1999 X-OS: FreeBSD 4.0-CURRENT Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In the last episode (Jun 21), Yusuf Goolamabbas said: > Hi, Is 32767 the magic number of sub-dirs which can be created in a > directory. Is there any way to increase this number. This seems to be > derived from the define LINK_MAX in sys/syslimits.h in /sys/ufs/ufs/dinode.h, in struct dinode: int16_t di_nlink; /* 2: File link count. */ which means it's limited to a 16-byte value (so theoretically 65535, but it's a signed value). Do you really have 32767 subdirs? ffs has to do a linear traversal of the directory to find any entry; that can slow down file access. Have you thought about making multiple directory levels? -Dan Nelson dnelson@emsphone.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message