From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tomas Hruby Subject: ext2/3 subdirectory limit [WAS: Choosing and tuning Linux file systems] Date: Mon, 26 Jun 2006 14:36:35 +0200 Message-ID: <20060626123635.GA15200@fspc268> References: <20060625220052.GX19196@goober> <20060626111024.GB3114@harddisk-recovery.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org Return-path: Received: from top.few.vu.nl ([130.37.20.4]:64195 "EHLO top.few.vu.nl") by vger.kernel.org with ESMTP id S1751107AbWFZMcN (ORCPT ); Mon, 26 Jun 2006 08:32:13 -0400 To: Erik Mouw Content-Disposition: inline In-Reply-To: <20060626111024.GB3114@harddisk-recovery.com> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org > > More than ~32,000 files in one directory: XFS or reiser > > Ext3 can easily have more than 32000 *files* in a directory. However, > it can only have 32000 *subdirectories* in a directory. This limit is > from struct ext3_inode->i_links_count, which is an __le16: each > subdirectory has an entry ".." that links back to its parent increasing > the parents i_links_count. I was always wondering why it increases link_count of the parent directory when creating a subdirectory. It is clear that .. points to the parent, but the subdirectory cannot exist without its parent and you cannot delete the parent if it is not empty. Correct me if I am wrong. What is the link_count (incremented by subdirectories) used for? Is it ext2/3 specific or should it be implemented in such a way by other FS too? I am asking becuse I see no reason why to do so in our FS. Cheers, Tomas