linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: tytso@mit.edu
To: Andreas Dilger <andreas.dilger@oracle.com>
Cc: Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH, RFC 3/3] ext4: Add option for squelching ext4 errors to prevent dmesg from filling up
Date: Fri, 19 Mar 2010 22:20:16 -0400	[thread overview]
Message-ID: <20100320022016.GC26083@thunk.org> (raw)
In-Reply-To: <7C462C5D-0B00-45A8-95A4-AEF74EBC534E@oracle.com>

On Fri, Mar 19, 2010 at 04:56:13PM -0600, Andreas Dilger wrote:
> On 2010-03-18, at 18:50, Theodore Ts'o wrote:
> >@@ -363,12 +363,19 @@ void ext4_error_inode(const char *function,
> >struct inode *inode,
> >{
> >	va_list args;
> >
> >+	if (!ext4_test_inode_state(inode, EXT4_STATE_ERR_SQUELCHED) ||
> >+	    !(EXT4_SB(inode->i_sb)->s_mount_flags & EXT4_MF_FS_SQUELCH)) {
> >+		va_start(args, fmt);
> >+		printk(KERN_CRIT "EXT4-fs error (device %s): %s: "
> >+		       "inode #%lu: (comm %s) ",
> >+		       inode->i_sb->s_id, function, inode->i_ino,
> >+		       current->comm);
> >+		vprintk(fmt, args);
> >+		printk("\n");
> >+		va_end(args);
> 
> Shouldn't this really be using ext4_msg()?

ext4_msg only prints messages of the form:

EXT4-fs (<dev>): message

ext4_error() and friends only prints messages of the form:

EXT4-fs error (<dev>): error message

And ext4_warning() and friends only prints messages of the form:

EXT4-fs warning (<dev>): error message

(at various different priority levels)

So no, at the moment, when we are printing something that is intending
to be found via syslog parsers as an ext4 file system error, we can't
use ext4_msg().

Could we do some more factorization of our various ext4 printk
functions?  Probably.  But the point of this patch wasn't to
refactorize the ext4 printk functions....

					- Ted

      reply	other threads:[~2010-03-20  2:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-19  0:50 [PATCH, RFC 1/3] ext4: Convert calls of ext4_error() to EXT4_ERROR_INODE() Theodore Ts'o
2010-03-19  0:50 ` [PATCH, RFC 2/3] ext4: Add support for adding boolean toggls to ext4's sysfs directory Theodore Ts'o
2010-03-19  0:50 ` [PATCH, RFC 3/3] ext4: Add option for squelching ext4 errors to prevent dmesg from filling up Theodore Ts'o
2010-03-19 22:56   ` Andreas Dilger
2010-03-20  2:20     ` tytso [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=20100320022016.GC26083@thunk.org \
    --to=tytso@mit.edu \
    --cc=andreas.dilger@oracle.com \
    --cc=linux-ext4@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).