Messages in this thread Patch in this message | | | Date | Fri, 14 Nov 2008 13:19:42 +0100 | From | Andre Noll <> | Subject | Re: typo in raid[456] kernel code/no change based on type? |
| |
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[unhandled content-type:application/pgp-signature] | |