linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Ted Ts'o <tytso@mit.edu>
Cc: David Miller <davem@davemloft.net>,
	anca.emanuel@gmail.com, adilger.kernel@dilger.ca,
	linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/9] ext4: Use pr_fmt and pr_<level>
Date: Mon, 19 Mar 2012 18:33:22 -0700	[thread overview]
Message-ID: <1332207202.7847.23.camel@joe2Laptop> (raw)
In-Reply-To: <20120320010401.GA14363@thunk.org>

On Mon, 2012-03-19 at 21:04 -0400, Ted Ts'o wrote:
> On Mon, Mar 19, 2012 at 11:46:13AM -0700, Joe Perches wrote:
> > On Mon, 2012-03-19 at 14:31 -0400, Ted Ts'o wrote:
> > > On Mon, Mar 19, 2012 at 02:14:02PM -0400, David Miller wrote:
> > > I've *already* gone far beyond the pr_fmt standardization, with the
> > > ext4_msg() and ext4_error() system
> > 
> > Please note the defects that were recently corrected there
> > which occurred because of a lack of standardization both
> > in prefix and termination style.
> 
> For debugging printk's that are #ifdef'ed for anyone other than ext4
> developers and can't be enabled via CONFIG_*.  Yawn.

Really?  Huh.  Are these messages debugging only?
Not really.

$ grep "ext4_msg.*EXT4-fs: " fs/ext4/*.c
fs/ext4/mballoc.c:			ext4_msg(sb, KERN_ERR, "EXT4-fs: can't allocate mem "
fs/ext4/mballoc.c:		ext4_msg(sb, KERN_ERR, "EXT4-fs: can't allocate buddy mem");
fs/ext4/mballoc.c:	ext4_msg(ac->ac_sb, KERN_ERR, "EXT4-fs: Can't allocate:"
fs/ext4/mballoc.c:	ext4_msg(ac->ac_sb, KERN_ERR, "EXT4-fs: status %d flags %d",
fs/ext4/mballoc.c:	ext4_msg(ac->ac_sb, KERN_ERR, "EXT4-fs: orig %lu/%lu/%lu@%lu, "
fs/ext4/mballoc.c:	ext4_msg(ac->ac_sb, KERN_ERR, "EXT4-fs: %lu scanned, %d found",
fs/ext4/mballoc.c:	ext4_msg(ac->ac_sb, KERN_ERR, "EXT4-fs: groups: ");

They _were_ doubly prefixed.

from ext4#dev

commit 2504a4a9c0c096e11bcc24691b85bf6d942df9fe
Author: Joe Perches <joe@perches.com>
Date:   Mon Mar 19 00:12:00 2012 -0400

    ext4: remove redundant "EXT4-fs: " from uses of ext4_msg
    
    ext4_msg adds "EXT4-fs: " to the messsage output.
    Remove the redundant bits from uses.
    
    Signed-off-by: Joe Perches <joe@perches.com>
    Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>

> > Any logging system, with or without an external notification
> > mechanism, will be painful.  pr_<foo> is at least a small
> > start.  I'd like to see a notification mechanism, perhaps ala
> > netlink/ethtool to extend pr_<foo> or another call.  A lot of
> > these printk/pr_<level> uses really could generate notifications.
> 
> Yes, but we can't do structured notifications with the current
> pr_<foo>.  So why change literally tens of thousands of callsites when
> in order to really realize the full promise of structured
> notifications, we'll have to change them *again*?

So that they are consistent and extensible and can use
something like pr_<level>_notify, just like pr_<level>_once
and pr_<level>_ratelimited, or some other similar form.


  reply	other threads:[~2012-03-20  1:33 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-16  0:07 [PATCH 0/9] ext4: Message logging corrections and neatening Joe Perches
2012-03-16  0:07 ` [PATCH 1/9] ext4: Add -DDEBUG to Makefile Joe Perches
2012-03-16 16:03   ` David Daney
2012-03-16 16:29     ` Joe Perches
2012-03-19  4:39     ` Ted Ts'o
2012-03-19 16:26       ` Joe Perches
2012-03-19 18:48       ` David Daney
2012-03-20  1:05         ` Ted Ts'o
2012-03-16  0:07 ` [PATCH 2/9] ext4: Use pr_fmt and pr_<level> Joe Perches
2012-03-19  4:09   ` Ted Ts'o
2012-03-19  4:14     ` David Miller
2012-03-19  4:34       ` Ted Ts'o
2012-03-19  5:12         ` David Miller
2012-03-19 15:31           ` Ted Ts'o
2012-03-19 15:51             ` Anca Emanuel
2012-03-19 16:14               ` Joe Perches
2012-03-19 16:14               ` Ted Ts'o
2012-03-19 18:14                 ` David Miller
2012-03-19 18:31                   ` Ted Ts'o
2012-03-19 18:46                     ` Joe Perches
2012-03-20  1:04                       ` Ted Ts'o
2012-03-20  1:33                         ` Joe Perches [this message]
2012-03-20  1:47                           ` Ted Ts'o
2012-03-20  1:59                             ` Joe Perches
2012-03-20  2:58                               ` Ted Ts'o
2012-03-20  3:02                                 ` Joe Perches
2012-03-20  5:46                                   ` Valdis.Kletnieks
2012-03-20  7:10                                     ` David Miller
2012-03-20  8:47                                       ` Jiri Slaby
2012-03-20  9:44                                         ` Joe Perches
2012-03-20  9:27                                       ` Geert Uytterhoeven
2012-03-20 13:03                                       ` Ted Ts'o
2012-03-20 18:47                                       ` Valdis.Kletnieks
2012-03-20  1:46                         ` Al Viro
2012-03-19 17:53             ` David Miller
2012-03-19  4:25     ` Joe Perches
2012-03-19  4:36       ` Ted Ts'o
2012-03-19 16:46       ` Jiri Slaby
2012-03-19 17:09         ` Joe Perches
2012-03-19 17:36           ` Valdis.Kletnieks
2012-03-19 17:44             ` Joe Perches
2012-03-20  1:06               ` Ted Ts'o
2012-03-20  1:28                 ` david
2012-03-20  1:51                   ` Joe Perches
2012-03-20  1:33                 ` Joe Perches
2012-03-20  8:57           ` Jiri Slaby
2012-03-20  9:21             ` Joe Perches
2012-03-20  9:25               ` Jiri Slaby
2012-03-20  9:46                 ` Joe Perches
2012-03-22 17:02                   ` Jiri Slaby
2012-03-22 17:42                     ` Joe Perches
2012-03-19  4:55   ` Ted Ts'o
2012-03-19  5:13     ` David Miller
2012-03-19  5:39     ` Joe Perches
2012-03-16  0:07 ` [PATCH 3/9] ext4: Fix indentation Joe Perches
2012-03-19  4:10   ` Ted Ts'o
2012-03-19  4:30     ` Joe Perches
2012-03-16  0:07 ` [PATCH 4/9] ext4: Add no_printk argument validation, fix fallout Joe Perches
2012-03-19  4:16   ` Ted Ts'o
2012-03-16  0:07 ` [PATCH 5/9] ext4: Avoid output message interleaving in ext4_error_<foo> Joe Perches
2012-03-19  4:51   ` Ted Ts'o
2012-03-16  0:07 ` [PATCH 6/9] ext4: Remove redundant "EXT4-fs: " from uses of ext4_msg Joe Perches
2012-03-19  4:13   ` Ted Ts'o
2012-03-16  0:07 ` [PATCH 7/9] ext4: Format neatening for easier grep Joe Perches
2012-03-19  4:26   ` Ted Ts'o
2012-03-19  4:30     ` Joe Perches
2012-03-16  0:07 ` [PATCH 8/9] ext4: Neaten ext4_error uses Joe Perches
2012-03-16  0:07 ` [PATCH 9/9] ext4: Rename ext4_warning to ext4_warn and ext4_error to ext4_err Joe Perches
2012-03-19  4:51   ` Ted Ts'o

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=1332207202.7847.23.camel@joe2Laptop \
    --to=joe@perches.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=anca.emanuel@gmail.com \
    --cc=davem@davemloft.net \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.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;
as well as URLs for NNTP newsgroup(s).