aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid0.c
diff options
context:
space:
mode:
authorAndre Noll <maan@systemlinux.org>2009-01-08 16:31:06 -0500
committerNeilBrown <neilb@suse.de>2009-01-08 16:31:06 -0500
commit019c4e2f3e02aac4b44003913b54ca4b332e4371 (patch)
treeebdd73075be543d5feb1a1e86a793a2b3311ea9b /drivers/md/raid0.c
parente0f06868341700c5c1964a04f6c5b51d0a2d5bca (diff)
md: raid0: Represent device offset in sectors.
Rename zone->dev_offset to zone->dev_start to make sure all users have been converted. 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.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c
index fd65d8806c0f..b860536dc894 100644
--- a/drivers/md/raid0.c
+++ b/drivers/md/raid0.c
@@ -167,7 +167,7 @@ static int create_strip_zones (mddev_t *mddev)
167 zone->dev = conf->strip_zone[i-1].dev + mddev->raid_disks; 167 zone->dev = conf->strip_zone[i-1].dev + mddev->raid_disks;
168 168
169 printk("raid0: zone %d\n", i); 169 printk("raid0: zone %d\n", i);
170 zone->dev_offset = current_offset; 170 zone->dev_start = current_offset * 2;
171 smallest = NULL; 171 smallest = NULL;
172 c = 0; 172 c = 0;
173 173
@@ -452,8 +452,7 @@ static int raid0_make_request (struct request_queue *q, struct bio *bio)
452 x = sector >> chunksect_bits; 452 x = sector >> chunksect_bits;
453 tmp_dev = zone->dev[sector_div(x, zone->nb_dev)]; 453 tmp_dev = zone->dev[sector_div(x, zone->nb_dev)];
454 } 454 }
455 rsect = (((chunk << (chunksect_bits - 1)) + zone->dev_offset)<<1) 455 rsect = (chunk << chunksect_bits) + zone->dev_start + sect_in_chunk;
456 + sect_in_chunk;
457 456
458 bio->bi_bdev = tmp_dev->bdev; 457 bio->bi_bdev = tmp_dev->bdev;
459 bio->bi_sector = rsect + tmp_dev->data_offset; 458 bio->bi_sector = rsect + tmp_dev->data_offset;
@@ -490,9 +489,9 @@ static void raid0_status (struct seq_file *seq, mddev_t *mddev)
490 seq_printf(seq, "%s/", bdevname( 489 seq_printf(seq, "%s/", bdevname(
491 conf->strip_zone[j].dev[k]->bdev,b)); 490 conf->strip_zone[j].dev[k]->bdev,b));
492 491
493 seq_printf(seq, "] zo=%d do=%d s=%d\n", 492 seq_printf(seq, "] zo=%d ds=%d s=%d\n",
494 conf->strip_zone[j].zone_offset, 493 conf->strip_zone[j].zone_offset,
495 conf->strip_zone[j].dev_offset, 494 conf->strip_zone[j].dev_start,
496 conf->strip_zone[j].size); 495 conf->strip_zone[j].size);
497 } 496 }
498#endif 497#endif