Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758836Ab1CCVaV (ORCPT ); Thu, 3 Mar 2011 16:30:21 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:37755 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758737Ab1CCVaS (ORCPT ); Thu, 3 Mar 2011 16:30:18 -0500 Date: Thu, 3 Mar 2011 21:30:16 +0000 From: Al Viro To: Linus Torvalds Cc: OGAWA Hirofumi , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC] st_nlink after rmdir() and rename() Message-ID: <20110303213016.GP22723@ZenIV.linux.org.uk> References: <20110303032454.GI22723@ZenIV.linux.org.uk> <20110303060352.GK22723@ZenIV.linux.org.uk> <87tyfk7x0c.fsf@devron.myhome.or.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 970 Lines: 21 On Thu, Mar 03, 2011 at 01:02:50PM -0800, Linus Torvalds wrote: > > So we have to simulate some levels. I guess you > > are not saying we don't need to care it at all though. > > I'm saying that it should just work to set i_nlink=1 and not do > anything at all. Ever. It's a valid model for directory counts. Sure, no problem. Just leave that cleaning of i_nlink on victim in unlink/rmdir/rename; we *really* rely on that in e.g. deciding when to free the damn inode in fat_evict_inode(). We need to mark them for freeing _anyway_, right? It doesn't depend on what exact value do we keep for live directories - "everyone got 1 for as long as they live" is just fine, and IMO it's a win, but it's an unrelated question. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/