public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@sun.com>
To: Eric Sandeen <esandeen@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	lkml@metanurb.dk, linux-kernel@vger.kernel.org,
	linux-ext4@vger.kernel.org
Subject: Re: [PATCH] Make some ext3 kernel messages useful by showing device
Date: Mon, 09 Jun 2008 16:08:02 -0600	[thread overview]
Message-ID: <20080609220802.GF3726@webber.adilger.int> (raw)
In-Reply-To: <20080609134918.ed83d0d7.akpm@linux-foundation.org>

Eric Sandeen <sandeen@redhat.com> wrote:
> The patch itself looks fine to me, and is a good idea.  I recently saw a
> confused user on another fs where successful mount messages were
> followed by failure mount messages with no indication of which fs had
> the trouble...
> 
> There probably are more spots in extX which could use this treatment...
> should we maybe just be using ext3_warning in more places, which
> automatically prints the sb, function name, etc?

Most of the messages in ext[234]_fill_super() should really be ext3_error(),
but because the superblock isn't properly set up calling ext3_error() is a
way to oops the kernel.

Probably the cleanest solution is to split ext3_error() into a helper function
ext3_error_msg() that can be called from ext3_fill_super(), and the rest
of the code that now lives in ext3_handle_error().

Alternately, a flag could be set in the superblock ("EXT3_SETUP_DONE")
once everything is initialized, and then ext3_error() calls
ext3_handle_error(), and otherwise just prints the message and the
mount will fail by itself.  This has the benefit that we can use
ext3_error() everywhere there is a fatal problem, but the drawback that
it may become confusing due to the added "errors=*" semantics that will
not behave as they do in other functions.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.


      reply	other threads:[~2008-06-09 22:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-08 19:02 [PATCH] Make some ext3 kernel messages useful by showing device Kasper Sandberg
2008-06-09  9:59 ` Andrew Morton
2008-06-09 13:38   ` Kasper Sandberg
2008-06-09 20:48     ` Andrew Morton
2008-06-09 13:43   ` Eric Sandeen
2008-06-09 20:49     ` Andrew Morton
2008-06-09 22:08       ` Andreas Dilger [this message]

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=20080609220802.GF3726@webber.adilger.int \
    --to=adilger@sun.com \
    --cc=akpm@linux-foundation.org \
    --cc=esandeen@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkml@metanurb.dk \
    /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