Re: [PATCH, RFC 3/3] ext4: Add option for squelching ext4 errors to prevent dmesg from filling up

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux