From: NeilBrown <neilb@suse.com>
To: Hannes Reinecke <hare@suse.de>, Shaohua Li <shli@kernel.org>
Cc: linux-raid@vger.kernel.org
Subject: Re: [md PATCH 0/9] replace printk() with pr_*()
Date: Thu, 03 Nov 2016 08:14:34 +1100 [thread overview]
Message-ID: <87d1idr3d1.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <5cd6d570-6d72-07b4-34a4-5b75503fcbf4@suse.de>
[-- Attachment #1: Type: text/plain, Size: 1871 bytes --]
On Wed, Nov 02 2016, Hannes Reinecke wrote:
> On 11/02/2016 04:16 AM, NeilBrown wrote:
>> This series removes all printk() calls from md code, preferring
>> pr_warn(), pr_err() etc.
>>
>> All strings that were split over multiple lines are not joined
>> back together because being able to search for a message is more
>> important that not having long lines in the code.
>> Lots of printk(KERN_DEBUG... are not pr_debug() which means the
>> messages won't get printed unless they are explicitly disabled.
>>
>> I included some rough guidelines on which pr_* to choose in md.c.
>> Many things became pr_debug(), most of the rest are pr_warn().
>> pr_err() and pr_crit() are used sparingly.
>>
>> I simplified some code in multipath.c too.
>>
>> A particular benefit of this is that the various "print_conf()"
>> functions are not silent by default.
>> On very large arrays (raid10 with hundreds of devices), these can
>> be very noisy.
>>
> Any specify reason why you didn't move to use dev_*() style of errors?
> Generally I prefer having the messages prefixed with the device which
> caused them; making debugging _so_ much easier ...
I was already a bit concerned about how much change was in the one set
of patches:
- rejoining large strings
- changing printk to pr_*
- revising log levels
I wouldn't want to add more change. But as something to be added
afterwards I support the idea in principle, but in practice.....
What device would you pass to dev_*() ??
disk_to_dev(mddev->gendisk)
??
That wouldn't work when dm-raid is in the picture, as mddev->gendisk is
NULL in that case.
Is some cases we already include the md_name(). If there a specific
places were it could be added, I would certainly support adding the dev
name. I just don't think dev_*() is the way to do it for md.
Thanks,
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 800 bytes --]
next prev parent reply other threads:[~2016-11-02 21:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-02 3:16 [md PATCH 0/9] replace printk() with pr_*() NeilBrown
2016-11-02 3:16 ` [md PATCH 2/9] md: change all printk() to pr_err() or pr_warn() etc NeilBrown
2016-11-02 3:16 ` [md PATCH 1/9] md: fix some issues with alloc_disk_sb() NeilBrown
2016-11-02 3:16 ` [md PATCH 3/9] md/bitmap: change all printk() to pr_*() NeilBrown
2016-11-02 3:16 ` [md PATCH 5/9] md/multipath: replace printk() with pr_*() NeilBrown
2016-11-02 3:16 ` [md PATCH 4/9] md/linear: " NeilBrown
2016-11-02 3:16 ` [md PATCH 8/9] md/raid10: change printk() to pr_*() NeilBrown
2016-11-02 3:16 ` [md PATCH 6/9] md/raid0: replace printk() with pr_*() NeilBrown
2016-11-02 3:16 ` [md PATCH 9/9] md/raid5: change printk() to pr_*() NeilBrown
2016-11-02 3:16 ` [md PATCH 7/9] md/raid1: " NeilBrown
2016-11-02 12:36 ` [md PATCH 0/9] replace printk() with pr_*() Hannes Reinecke
2016-11-02 21:14 ` NeilBrown [this message]
2016-11-04 21:36 ` Shaohua Li
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=87d1idr3d1.fsf@notabene.neil.brown.name \
--to=neilb@suse.com \
--cc=hare@suse.de \
--cc=linux-raid@vger.kernel.org \
--cc=shli@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).