Date: Sun, 20 Jun 1999 23:42:32 -0500 From: Dan Nelson <dnelson@emsphone.com> To: Yusuf Goolamabbas <yusufg@outblaze.com> 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> In-Reply-To: <19990621035041.2682.qmail@yusufg.portal2.com>; from "Yusuf Goolamabbas" on Mon Jun 21 03:50:41 GMT 1999 References: <19990621035041.2682.qmail@yusufg.portal2.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990620234232.A6655>
