public inbox for linux-kernel@vger.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 11:25:36 +0100	[thread overview]
Message-ID: <20011124112536.K1419@athlon.random> (raw)
In-Reply-To: <20011124103854.I1419@athlon.random> <Pine.GSO.4.21.0111240445520.4000-100000@weyl.math.psu.edu>
In-Reply-To: <Pine.GSO.4.21.0111240445520.4000-100000@weyl.math.psu.edu>; from viro@math.psu.edu on Sat, Nov 24, 2001 at 04:56:41AM -0500

On Sat, Nov 24, 2001 at 04:56:41AM -0500, Alexander Viro wrote:
> 
> 
> On Sat, 24 Nov 2001, Andrea Arcangeli wrote:
> 
> > I think long term (2.5) the right way is to replace all the iput in the
> > slow fail paths with a iput_not_mounted, that will avoid both the iput
> > clobbering and the MS_ACTIVE tracking. The differentiation should be
> 
> Egads...  Andrea, think for a bloody minute.  What's the point of adding
> a new helper that would share a lot of code with the iput() _and_ would
> bring additional calling rules?  We get
> 	* more code in inode.c
> 	* more code duplications
> 	* a lot of opportunities to fsck up in fs code

red herring, you can solve all by simply implementing it sanely, for
example make it inline with a parameter (int sync), code duplication is
not the issue, icache waste obviously isn't either since the
_not_mounted version would never be called during prodution.

> 	* redundant invalidate_inodes() calls in fs/super.c existing just
> to catch these fsckups.

that would obviously go away if we take your way.

> 	* some filesystems getting out with only iput(), some needing new
> helper.

I don't follow this one, what's the point of "needing new helper"? The
iput_not_mounted would work like yours, but without the need of the
MS_ACTIVE tracking and without slowing down iput, and most important it
would make self documenting the synchronous behaviour and the need of
->clean_inode working.

> 	* cut'n'paste programming getting one more source of bugs to
> introduce.

See above.

> And it's not even the case when filesystems could use that distinction in
> any sane way...

This could be a valid point against that split of functions, I thought
all iputs were localized and not share with the production code indeed.

Or we could also stick with document that if somebody has the per-sb
things, he has to run invalidate_inodes() before freeing them, that
would be the "lesser code to maintain" and simpler solution (the one I
prefer for 2.4 incidentally). Another cons about this one is that gets
rid of the dirty inodes as well, so the read_super/put_super should also
take care to flush to disk by hand in the put_super/read_super if they
really ever needs. I tend to like to have structures in place only for
the production code, and to be able to share them for the special cases
too with minimal effort, but ok, this way the semantics gets a bit more
complicated for the very unlikely case. But in practice nobody will ever
need the flush or/and the explicit invalidate_inodes into the
put_user/read_super and 2.4.15aa1 should be just unbrekeable.

In short I'm fine either ways.

Andrea

  reply	other threads:[~2001-11-24 10:25 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
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 [this message]
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=20011124112536.K1419@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox