lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081114121942.GN17966@skl-net.de>
Date:	Fri, 14 Nov 2008 13:19:42 +0100
From:	Andre Noll <maan@...temlinux.org>
To:	Justin Piszcz <jpiszcz@...idpixels.com>
Cc:	linux-kernel@...r.kernel.org, linux-raid@...r.kernel.org
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@...temlinux.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@...temlinux.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

Download attachment "signature.asc" of type "application/pgp-signature" (190 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ