diff options
author | Andre Noll <maan@systemlinux.org> | 2009-01-09 08:31:07 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-01-09 08:31:07 +1100 |
commit | 0825b87a7dd9645c7e16489fec839a3cb5c40a08 (patch) | |
tree | 35c009c01470ce79fd1bc93d19c5bdb6b2a3b761 /drivers/md/raid0.c | |
parent | 6b8796cc3decb43c7c67a13a0699b6a21b754c78 (diff) |
md: raid0 create_strip_zones(): Add KERN_INFO/KERN_ERR to printk's.
This patch consists only of these trivial changes.
Signed-off-by: Andre Noll <maan@systemlinux.org>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid0.c')
-rw-r--r-- | drivers/md/raid0.c | 46 |
1 files changed, 25 insertions, 21 deletions
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index 9074ea43d52..c759436b5d8 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c @@ -68,18 +68,18 @@ static int create_strip_zones (mddev_t *mddev) conf->nr_strip_zones = 0; rdev_for_each(rdev1, tmp1, mddev) { - printk("raid0: looking at %s\n", + printk(KERN_INFO "raid0: looking at %s\n", bdevname(rdev1->bdev,b)); c = 0; rdev_for_each(rdev2, tmp2, mddev) { - printk("raid0: comparing %s(%llu)", + printk(KERN_INFO "raid0: comparing %s(%llu)", bdevname(rdev1->bdev,b), (unsigned long long)rdev1->size); - printk(" with %s(%llu)\n", + printk(KERN_INFO " with %s(%llu)\n", bdevname(rdev2->bdev,b), (unsigned long long)rdev2->size); if (rdev2 == rdev1) { - printk("raid0: END\n"); + printk(KERN_INFO "raid0: END\n"); break; } if (rdev2->size == rdev1->size) @@ -88,19 +88,20 @@ static int create_strip_zones (mddev_t *mddev) * Not unique, don't count it as a new * group */ - printk("raid0: EQUAL\n"); + printk(KERN_INFO "raid0: EQUAL\n"); c = 1; break; } - printk("raid0: NOT EQUAL\n"); + printk(KERN_INFO "raid0: NOT EQUAL\n"); } if (!c) { - printk("raid0: ==> UNIQUE\n"); + printk(KERN_INFO "raid0: ==> UNIQUE\n"); conf->nr_strip_zones++; - printk("raid0: %d zones\n", conf->nr_strip_zones); + printk(KERN_INFO "raid0: %d zones\n", + conf->nr_strip_zones); } } - printk("raid0: FINAL %d zones\n", conf->nr_strip_zones); + printk(KERN_INFO "raid0: FINAL %d zones\n", conf->nr_strip_zones); conf->strip_zone = kzalloc(sizeof(struct strip_zone)* conf->nr_strip_zones, GFP_KERNEL); @@ -123,12 +124,13 @@ static int create_strip_zones (mddev_t *mddev) int j = rdev1->raid_disk; if (j < 0 || j >= mddev->raid_disks) { - printk("raid0: bad disk number %d - aborting!\n", j); + printk(KERN_ERR "raid0: bad disk number %d - " + "aborting!\n", j); goto abort; } if (zone->dev[j]) { - printk("raid0: multiple devices for %d - aborting!\n", - j); + printk(KERN_ERR "raid0: multiple devices for %d - " + "aborting!\n", j); goto abort; } zone->dev[j] = rdev1; @@ -149,8 +151,8 @@ static int create_strip_zones (mddev_t *mddev) cnt++; } if (cnt != mddev->raid_disks) { - printk("raid0: too few disks (%d of %d) - aborting!\n", - cnt, mddev->raid_disks); + printk(KERN_ERR "raid0: too few disks (%d of %d) - " + "aborting!\n", cnt, mddev->raid_disks); goto abort; } zone->nb_dev = cnt; @@ -166,7 +168,7 @@ static int create_strip_zones (mddev_t *mddev) zone = conf->strip_zone + i; zone->dev = conf->strip_zone[i-1].dev + mddev->raid_disks; - printk("raid0: zone %d\n", i); + printk(KERN_INFO "raid0: zone %d\n", i); zone->dev_start = current_start; smallest = NULL; c = 0; @@ -174,23 +176,25 @@ static int create_strip_zones (mddev_t *mddev) for (j=0; j<cnt; j++) { char b[BDEVNAME_SIZE]; rdev = conf->strip_zone[0].dev[j]; - printk("raid0: checking %s ...", bdevname(rdev->bdev,b)); + printk(KERN_INFO "raid0: checking %s ...", + bdevname(rdev->bdev, b)); if (rdev->size > current_start / 2) { - printk(" contained as device %d\n", c); + printk(KERN_INFO " contained as device %d\n", + c); zone->dev[c] = rdev; c++; if (!smallest || (rdev->size <smallest->size)) { smallest = rdev; - printk(" (%llu) is smallest!.\n", + printk(KERN_INFO " (%llu) is smallest!.\n", (unsigned long long)rdev->size); } } else - printk(" nope.\n"); + printk(KERN_INFO " nope.\n"); } zone->nb_dev = c; zone->size = (smallest->size - current_start / 2) * c; - printk("raid0: zone->nb_dev: %d, size: %llu\n", + printk(KERN_INFO "raid0: zone->nb_dev: %d, size: %llu\n", zone->nb_dev, (unsigned long long)zone->size); zone->zone_start = curr_zone_start; @@ -226,7 +230,7 @@ static int create_strip_zones (mddev_t *mddev) mddev->queue->backing_dev_info.congested_fn = raid0_congested; mddev->queue->backing_dev_info.congested_data = mddev; - printk("raid0: done.\n"); + printk(KERN_INFO "raid0: done.\n"); return 0; abort: return 1; |