Commit c4909782 authored by Neil Brown's avatar Neil Brown Committed by Trond Myklebust

[PATCH] MD - Change partition_name calls to bdev_partition_name were possible.

Change partition_name calls to bdev_partition_name were possible.

All part of decreasing reliance on device numbers... atleast in
appearance.
parent 43fb3e86
This diff is collapsed.
...@@ -43,12 +43,12 @@ static int create_strip_zones (mddev_t *mddev) ...@@ -43,12 +43,12 @@ static int create_strip_zones (mddev_t *mddev)
conf->nr_strip_zones = 0; conf->nr_strip_zones = 0;
ITERATE_RDEV(mddev,rdev1,tmp1) { ITERATE_RDEV(mddev,rdev1,tmp1) {
printk("raid0: looking at %s\n", partition_name(rdev1->dev)); printk("raid0: looking at %s\n", bdev_partition_name(rdev1->bdev));
c = 0; c = 0;
ITERATE_RDEV(mddev,rdev2,tmp2) { ITERATE_RDEV(mddev,rdev2,tmp2) {
printk("raid0: comparing %s(%ld) with %s(%ld)\n", printk("raid0: comparing %s(%ld) with %s(%ld)\n",
partition_name(rdev1->dev), rdev1->size, bdev_partition_name(rdev1->bdev), rdev1->size,
partition_name(rdev2->dev), rdev2->size); bdev_partition_name(rdev2->bdev), rdev2->size);
if (rdev2 == rdev1) { if (rdev2 == rdev1) {
printk("raid0: END\n"); printk("raid0: END\n");
break; break;
...@@ -127,7 +127,7 @@ static int create_strip_zones (mddev_t *mddev) ...@@ -127,7 +127,7 @@ static int create_strip_zones (mddev_t *mddev)
for (j=0; j<cnt; j++) { for (j=0; j<cnt; j++) {
rdev = conf->strip_zone[0].dev[j]; rdev = conf->strip_zone[0].dev[j];
printk("raid0: checking %s ...", partition_name(rdev->dev)); printk("raid0: checking %s ...", bdev_partition_name(rdev->bdev));
if (rdev->size > current_offset) if (rdev->size > current_offset)
{ {
printk(" contained as device %d\n", c); printk(" contained as device %d\n", c);
...@@ -351,8 +351,8 @@ static int raid0_status (char *page, mddev_t *mddev) ...@@ -351,8 +351,8 @@ static int raid0_status (char *page, mddev_t *mddev)
for (j = 0; j < conf->nr_strip_zones; j++) { for (j = 0; j < conf->nr_strip_zones; j++) {
sz += sprintf(page + sz, " z%d=[", j); sz += sprintf(page + sz, " z%d=[", j);
for (k = 0; k < conf->strip_zone[j].nb_dev; k++) for (k = 0; k < conf->strip_zone[j].nb_dev; k++)
sz += sprintf (page+sz, "%s/", partition_name( sz += sprintf (page+sz, "%s/", bdev_partition_name(
conf->strip_zone[j].dev[k]->dev)); conf->strip_zone[j].dev[k]->bdev));
sz--; sz--;
sz += sprintf (page+sz, "] zo=%d do=%d s=%d\n", sz += sprintf (page+sz, "] zo=%d do=%d s=%d\n",
conf->strip_zone[j].zone_offset, conf->strip_zone[j].zone_offset,
......
...@@ -293,7 +293,7 @@ static void end_request(struct bio *bio) ...@@ -293,7 +293,7 @@ static void end_request(struct bio *bio)
* oops, read error: * oops, read error:
*/ */
printk(KERN_ERR "raid1: %s: rescheduling sector %lu\n", printk(KERN_ERR "raid1: %s: rescheduling sector %lu\n",
bdev_partition_name(bio->bi_bdev), r1_bio->sector); bdev_partition_name(conf->mirrors[mirror].bdev), r1_bio->sector);
reschedule_retry(r1_bio); reschedule_retry(r1_bio);
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment