From: Valdis.Kletnieks@vt.edu
To: David Miller <davem@davemloft.net>
Cc: joe@perches.com, tytso@mit.edu, 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: Tue, 20 Mar 2012 14:47:23 -0400 [thread overview]
Message-ID: <35179.1332269243@turing-police.cc.vt.edu> (raw)
In-Reply-To: Your message of "Tue, 20 Mar 2012 03:10:01 EDT." <20120320.031001.1532841232287663716.davem@davemloft.net>
[-- Attachment #1: Type: text/plain, Size: 1394 bytes --]
On Tue, 20 Mar 2012 03:10:01 EDT, David Miller said:
> From: Valdis.Kletnieks@vt.edu
> Date: Tue, 20 Mar 2012 01:46:06 -0400
>
> > OK. Say I'm a scraper. How do I distinguish between:
> >
> > pr_info("foo");
> > printk(KERN_INFO "foo");
> >
> > Oh my. seems that both result in exactly the same thing ending up in the
> > dmesg buffer
>
> No it doesn't result in the same output, read the definitions again.
>
> pr_info can be influenced by pr_fmt, plain printk cannot
So if nobody screws around with a #define pr_fmt, you can't tell the
difference, and if somebody *does* screw around wiht a #define pr_fmt, you have
no good way to know what *this* build of the kernel produces as output without
tracking down the actual define in use. Consider Joe Perche's example "you can
do things like" - you don't have a good programmatic way to tell what that
pr_info() actually outputs, so an actual human is going to have to review that
and figure out what needs to be pattern-matched.
Not a situation you want to be in if you're a scraper.
At least the perf subsystem is nice enough to *tell* you "I've added an extra
field you may not know about" and provides a mechanism to skip over it.
And I can see why Ted doesn't want to have code churn to do a half-assed
conversion, when there will just be *more* churn if and when we ever get off
our collective butts and deploy a structured solution.
[-- Attachment #2: Type: application/pgp-signature, Size: 865 bytes --]
next prev parent reply other threads:[~2012-03-20 18:47 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
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 [this message]
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=35179.1332269243@turing-police.cc.vt.edu \
--to=valdis.kletnieks@vt.edu \
--cc=adilger.kernel@dilger.ca \
--cc=anca.emanuel@gmail.com \
--cc=davem@davemloft.net \
--cc=joe@perches.com \
--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
all inboxes | Powered by JetHome®