All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: Alexander Viro <viro@math.psu.edu>
Cc: Linus Torvalds <torvalds@transmeta.com>,
	linux-kernel@vger.kernel.org,
	Marcelo Tosatti <marcelo@conectiva.com.br>
Subject: Re: 2.4.15-pre9 breakage (inode.c)
Date: Sat, 24 Nov 2001 08:01:13 +0100	[thread overview]
Message-ID: <20011124080113.A1316@athlon.random> (raw)
In-Reply-To: <Pine.GSO.4.21.0111240129470.4000-100000@weyl.math.psu.edu> <Pine.GSO.4.21.0111240132290.4000-100000@weyl.math.psu.edu> <20011124075045.B1601@athlon.random>
In-Reply-To: <20011124075045.B1601@athlon.random>; from andrea@suse.de on Sat, Nov 24, 2001 at 07:50:45AM +0100

On Sat, Nov 24, 2001 at 07:50:45AM +0100, Andrea Arcangeli wrote:
> 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);

this one looks even better (and it doesn't need to propagate the fix to
the lowlevel):

--- 2.4.15aa1/fs/super.c.~1~	Fri Nov 23 08:21:01 2001
+++ 2.4.15aa1/fs/super.c	Sat Nov 24 07:58:37 2001
@@ -470,6 +470,7 @@
 	return s;
 
 out_fail:
+	invalidate_inodes(s);
 	s->s_dev = 0;
 	s->s_bdev = 0;
 	s->s_type = NULL;

Andrea

  parent reply	other threads:[~2001-11-24  7:01 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-23 21:22 2.4.15-pre9 breakage (inode.c) Alexander Viro
2001-11-23 21:42 ` Jeff Merkey
2001-11-23 21:51 ` [PATCH][CFT] " Alexander Viro
2001-11-23 22:06   ` Alexander Viro
2001-11-23 22:34     ` Russell King
2001-11-23 22:35     ` Phil Sorber
2001-11-23 22:49       ` Alexander Viro
2001-11-23 23:05     ` Andreas Dilger
2001-11-23 23:35       ` Russell King
2001-11-24  1:48       ` Linus Torvalds
2001-11-24  5:47 ` Andrea Arcangeli
2001-11-24  5:55   ` Linus Torvalds
2001-11-24  6:08     ` Alexander Viro
2001-11-24  6:26       ` Andrea Arcangeli
2001-11-24  6:31         ` Alexander Viro
2001-11-24  6:37           ` Alexander Viro
2001-11-24  6:50             ` Andrea Arcangeli
2001-11-24  6:58               ` Alexander Viro
2001-11-24  7:01               ` Andrea Arcangeli [this message]
2001-11-24  7:06                 ` Alexander Viro
2001-11-24  7:12                   ` Andrea Arcangeli
2001-11-24  7:30                     ` Alexander Viro
2001-11-24  7:44                       ` Andrea Arcangeli
2001-11-24  8:05                         ` Alexander Viro
2001-11-24  8:21                           ` Andrea Arcangeli
2001-11-24  8:38                             ` Alexander Viro
2001-11-24  9:38                               ` Andrea Arcangeli
2001-11-24  9:56                                 ` Alexander Viro
2001-11-24 10:25                                   ` Andrea Arcangeli
2001-11-24  6:44           ` Andrea Arcangeli
2001-11-24  6:51             ` Alexander Viro
2001-11-24  9:00     ` Russell King
2001-11-24 10:20     ` Christian Bornträger
2001-11-24  6:04   ` Alexander Viro
2001-11-24  6:20     ` Andrea Arcangeli
2001-11-24  6:29       ` Alexander Viro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011124080113.A1316@athlon.random \
    --to=andrea@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    --cc=torvalds@transmeta.com \
    --cc=viro@math.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.