Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sat, 24 Nov 2001 01:50:50 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sat, 24 Nov 2001 01:50:41 -0500 Received: from penguin.e-mind.com ([195.223.140.120]:4908 "EHLO penguin.e-mind.com") by vger.kernel.org with ESMTP id ; Sat, 24 Nov 2001 01:50:30 -0500 Date: Sat, 24 Nov 2001 07:50:45 +0100 From: Andrea Arcangeli To: Alexander Viro Cc: Linus Torvalds , linux-kernel@vger.kernel.org, Marcelo Tosatti Subject: Re: 2.4.15-pre9 breakage (inode.c) Message-ID: <20011124075045.B1601@athlon.random> In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.12i In-Reply-To: ; from viro@math.psu.edu on Sat, Nov 24, 2001 at 01:37:22AM -0500 X-GnuPG-Key-URL: http://e-mind.com/~andrea/aa.gnupg.asc X-PGP-Key-URL: http://e-mind.com/~andrea/aa.asc Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Nov 24, 2001 at 01:37:22AM -0500, Alexander Viro wrote: > > > On Sat, 24 Nov 2001, Alexander Viro wrote: > > > On Sat, 24 Nov 2001, Andrea Arcangeli wrote: > > > > > you are screwed because you were running a broken filesystem: it is its > > > own business to drop the inodes if it fails, all it needs to do is to > > > call invalidate_inodes(s) internally before returning from the read_super > > > in the failure case. > > > > Cute. Do you realize that _every_ fs would have to do that? > > Put it that way: > * if ->read_super() decides to fail, it should evict all inodes > it had put into icache. > * if ->put_super() does any iput(), it should take care to evict > that inode from icache. exactly. > IOW, > * if we do iput() while we are outside of (success of ->read_super(), > call of ->put_super()) - we want that inode to be evicted ASAP. > > Which is precisely what 2.4.15+patch does. and it's slower and overlay complex compared to the right fix: --- 2.4.15aa1/fs/ext2/super.c.~1~ Fri Nov 23 08:21:00 2001 +++ 2.4.15aa1/fs/ext2/super.c Sat Nov 24 07:50:19 2001 @@ -643,6 +643,7 @@ printk(KERN_ERR "EXT2-fs: corrupt root inode, run e2fsck\n"); } else printk(KERN_ERR "EXT2-fs: get root inode failed\n"); + invalidate_inodes(sb); goto failed_mount2; } ext2_setup_super (sb, es, sb->s_flags & MS_RDONLY); Andrea - 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/