From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H. Peter Anvin" Subject: Re: ext2/3 subdirectory limit [WAS: Choosing and tuning Linux file systems] Date: Mon, 26 Jun 2006 14:13:31 -0700 Message-ID: <44A04DFB.3020801@zytor.com> References: <20060625220052.GX19196@goober> <20060626111024.GB3114@harddisk-recovery.com> <20060626123635.GA15200@fspc268> <20060626125435.GA3911@thunk.org> <20060626173556.GA19815@tuatara.stupidest.org> <20060626210357.GA4308@fspc268> <20060626210341.GB28032@tuatara.stupidest.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Tomas Hruby , Theodore Tso , Erik Mouw , linux-fsdevel@vger.kernel.org Return-path: Received: from terminus.zytor.com ([192.83.249.54]:18131 "EHLO terminus.zytor.com") by vger.kernel.org with ESMTP id S932095AbWFZVOV (ORCPT ); Mon, 26 Jun 2006 17:14:21 -0400 To: Chris Wedgwood In-Reply-To: <20060626210341.GB28032@tuatara.stupidest.org> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Chris Wedgwood wrote: > >> As Ted said, not all fiel systems follow this. This means that such >> applications cannot e.g., remove a directory (rm -r) from such a FS? > > i don't know about rm, but some versions of find need -noleaf (see the > man page for details) > >> I am asking because we have an issue that an older version of mc >> cannot remove directory recursively, however we have not observed >> this on any new system. Might the nlink count be the problem? > > i'm not seen the nlink problem occur because pretty much all > filesystems have nlink set correctly *or* they set it to one like > autofs does which happens to work because 1-2-n underflows (there are > also those who claim that nlink==1 implies you don't know how many > links there are) Right. On most applications, it "just works" because of underflow (if you treat nlink as unsigned and subtract 2, then you get UINT_MAX which is functionally infinity.) This is a good reason for this particular retcon. The established practice is to set nlink to 1 if either you don't know how many links there are or there are too many to fit in the nlink field. -hpa