From owner-freebsd-questions@FreeBSD.ORG Sat Jan 14 08:39:42 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 832181065672 for ; Sat, 14 Jan 2012 08:39:42 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) by mx1.freebsd.org (Postfix) with ESMTP id 44C228FC08 for ; Sat, 14 Jan 2012 08:39:41 +0000 (UTC) Received: from r56.edvax.de (port-92-195-26-82.dynamic.qsc.de [92.195.26.82]) by mx02.qsc.de (Postfix) with ESMTP id 28D9C1E13D; Sat, 14 Jan 2012 09:39:41 +0100 (CET) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id q0E8deYM004204; Sat, 14 Jan 2012 09:39:40 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Sat, 14 Jan 2012 09:39:40 +0100 From: Polytropon To: FreeBSD Mailing List Message-Id: <20120114093940.af177d39.freebsd@edvax.de> In-Reply-To: <20120114092236.0c139ccd.freebsd@edvax.de> References: <4F113290.1060706@bananmonarki.se> <20120114092236.0c139ccd.freebsd@edvax.de> Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Bernt Hansson Subject: Re: disk problem(s) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2012 08:39:42 -0000 On Sat, 14 Jan 2012 09:22:36 +0100, Polytropon wrote: > The mkdir() function can be found (for UFS2) in the > file /usr/src/sys/gnu/fs/ext2fs/ext2_vnops.c at > line 1111 (sources of 8.2-STABLE i386 here). If > you examine what mkdir() does, you'll see that > the "too many links" is true when LINK_MAX is > exceeded. Per /usr/src/sys/gnu/fs/ext2fs/ext2_fs.h > we can determine that > > #define EXT2_LINK_MAX 32000 > > is defined. Can you check if 32000 is the amount > of directories created? Shit, what have I done... of course the files mentioned here do correspond to ext2 (Linux stuff), and _not_ to UFS2. The answer is in /usr/src/sys/sys/syslimits.h where we find the following definition: #define LINK_MAX 32767 /* max file link count */ Can you check _that_ number against the amount of directories created? By the way, in cases like this it's helpful if you provide the _command_ that you tried and the current directory from _where_ you've tried it. Also see /usr/src/sys/ufs/ufs/ufs_vnops.c, lines 1748 and onward, to see the UFS mkdir() system call acting with if ((nlink_t)dp->i_nlink >= LINK_MAX) { error = EMLINK; goto out; } when the LINK_MAX limit is reached. Sorry for the confusion. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...