Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 127721
b: refs/heads/master
c: 019c4e2
h: refs/heads/master
i:
  127719: 5b51249
v: v3
  • Loading branch information
Andre Noll authored and NeilBrown committed Jan 8, 2009
1 parent c5570af commit e04cb07
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e0f06868341700c5c1964a04f6c5b51d0a2d5bca
refs/heads/master: 019c4e2f3e02aac4b44003913b54ca4b332e4371
9 changes: 4 additions & 5 deletions trunk/drivers/md/raid0.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ static int create_strip_zones (mddev_t *mddev)
zone->dev = conf->strip_zone[i-1].dev + mddev->raid_disks;

printk("raid0: zone %d\n", i);
zone->dev_offset = current_offset;
zone->dev_start = current_offset * 2;
smallest = NULL;
c = 0;

Expand Down Expand Up @@ -452,8 +452,7 @@ static int raid0_make_request (struct request_queue *q, struct bio *bio)
x = sector >> chunksect_bits;
tmp_dev = zone->dev[sector_div(x, zone->nb_dev)];
}
rsect = (((chunk << (chunksect_bits - 1)) + zone->dev_offset)<<1)
+ sect_in_chunk;
rsect = (chunk << chunksect_bits) + zone->dev_start + sect_in_chunk;

bio->bi_bdev = tmp_dev->bdev;
bio->bi_sector = rsect + tmp_dev->data_offset;
Expand Down Expand Up @@ -490,9 +489,9 @@ static void raid0_status (struct seq_file *seq, mddev_t *mddev)
seq_printf(seq, "%s/", bdevname(
conf->strip_zone[j].dev[k]->bdev,b));

seq_printf(seq, "] zo=%d do=%d s=%d\n",
seq_printf(seq, "] zo=%d ds=%d s=%d\n",
conf->strip_zone[j].zone_offset,
conf->strip_zone[j].dev_offset,
conf->strip_zone[j].dev_start,
conf->strip_zone[j].size);
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/raid/raid0.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
struct strip_zone
{
sector_t zone_offset; /* Zone offset in md_dev */
sector_t dev_offset; /* Zone offset in real dev */
sector_t dev_start; /* Zone offset in real dev (in sectors) */
sector_t size; /* Zone size */
int nb_dev; /* # of devices attached to the zone */
mdk_rdev_t **dev; /* Devices attached to the zone */
Expand Down

0 comments on commit e04cb07

Please sign in to comment.