From: Andre Noll <maan@systemlinux.org>
To: Justin Piszcz <jpiszcz@lucidpixels.com>
Cc: linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org
Subject: Re: typo in raid[456] kernel code/no change based on type?
Date: Fri, 14 Nov 2008 13:19:42 +0100 [thread overview]
Message-ID: <20081114121942.GN17966@skl-net.de> (raw)
In-Reply-To: <alpine.DEB.1.10.0811121858300.10512@p34.internal.lan>
[-- Attachment #1: Type: text/plain, Size: 1949 bytes --]
On 18:58, Justin Piszcz wrote:
> >md3 : active raid6 sdj1[10] sdc1[4] sdl1[8] sdk1[1] sdi1[9] sdh1[7]
[snip]
> >[ 6982.273208] RAID5 conf printout:
> > ^^^^^
Please try the patch below which fixes this inconsistency.
Andre
commit 6c2f32376c59f08a893cd4736d92f000618dd88f
Author: Andre Noll <maan@systemlinux.org>
Date: Fri Nov 14 13:31:56 2008 +0100
Improve raid printout for raid levels 4 and 6.
As noted by Justin Piszcz we currently log a "RAID5 conf printout:" message
also for raid4 and raid6 arrays. This trivial patch prints the correct raid
level, adds KERN_INFO to all printk's in print_raid5_conf() and fixes a minor
coding style issue.
Signed-off-by: Andre Noll <maan@systemlinux.org>
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index a36a743..7920b26 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -4343,24 +4343,24 @@ static void status(struct seq_file *seq, mddev_t *mddev)
#endif
}
-static void print_raid5_conf (raid5_conf_t *conf)
+static void print_raid5_conf(raid5_conf_t *conf)
{
int i;
struct disk_info *tmp;
- printk("RAID5 conf printout:\n");
if (!conf) {
- printk("(conf==NULL)\n");
+ printk(KERN_INFO "RAID 4/5/6: (conf==NULL)\n");
return;
}
- printk(" --- rd:%d wd:%d\n", conf->raid_disks,
- conf->raid_disks - conf->mddev->degraded);
+ printk(KERN_INFO "RAID%d printout:\n", conf->level);
+ printk(KERN_INFO " --- rd:%d wd:%d\n", conf->raid_disks,
+ conf->raid_disks - conf->mddev->degraded);
for (i = 0; i < conf->raid_disks; i++) {
char b[BDEVNAME_SIZE];
tmp = conf->disks + i;
if (tmp->rdev)
- printk(" disk %d, o:%d, dev:%s\n",
+ printk(KERN_INFO " disk %d, o:%d, dev:%s\n",
i, !test_bit(Faulty, &tmp->rdev->flags),
bdevname(tmp->rdev->bdev,b));
}
--
The only person who always got his work done by Friday was Robinson Crusoe
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2008-11-14 12:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <alpine.DEB.1.10.0811121855470.10512@p34.internal.lan>
2008-11-12 23:58 ` typo in raid[456] kernel code/no change based on type? Justin Piszcz
2008-11-14 12:19 ` Andre Noll [this message]
2008-11-14 13:05 ` Justin Piszcz
2008-11-14 17:53 ` Andre Noll
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=20081114121942.GN17966@skl-net.de \
--to=maan@systemlinux.org \
--cc=jpiszcz@lucidpixels.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@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).