Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 127722
b: refs/heads/master
c: 6199d3d
h: refs/heads/master
v: v3
  • Loading branch information
Andre Noll authored and NeilBrown committed Jan 8, 2009
1 parent e04cb07 commit 3f1b21c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 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: 019c4e2f3e02aac4b44003913b54ca4b332e4371
refs/heads/master: 6199d3db0fc34f8ada895879d04a353a6ae632bc
12 changes: 6 additions & 6 deletions trunk/drivers/md/raid0.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ static int create_strip_zones (mddev_t *mddev)
}
zone->nb_dev = cnt;
zone->size = smallest->size * cnt;
zone->zone_offset = 0;
zone->zone_start = 0;

current_offset = smallest->size;
curr_zone_offset = zone->size;
Expand Down Expand Up @@ -194,7 +194,7 @@ static int create_strip_zones (mddev_t *mddev)
printk("raid0: zone->nb_dev: %d, size: %llu\n",
zone->nb_dev, (unsigned long long)zone->size);

zone->zone_offset = curr_zone_offset;
zone->zone_start = curr_zone_offset * 2;
curr_zone_offset += zone->size;

current_offset = smallest->size;
Expand Down Expand Up @@ -437,14 +437,14 @@ static int raid0_make_request (struct request_queue *q, struct bio *bio)
zone = conf->hash_table[x];
}

while (sector / 2 >= (zone->zone_offset + zone->size))
while (sector / 2 >= (zone->zone_start / 2 + zone->size))
zone++;

sect_in_chunk = bio->bi_sector & (chunk_sects - 1);


{
sector_t x = (sector - zone->zone_offset * 2) >> chunksect_bits;
sector_t x = (sector - zone->zone_start) >> chunksect_bits;

sector_div(x, zone->nb_dev);
chunk = x;
Expand Down Expand Up @@ -489,8 +489,8 @@ 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 ds=%d s=%d\n",
conf->strip_zone[j].zone_offset,
seq_printf(seq, "] zs=%d ds=%d s=%d\n",
conf->strip_zone[j].zone_start,
conf->strip_zone[j].dev_start,
conf->strip_zone[j].size);
}
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 @@ -5,7 +5,7 @@

struct strip_zone
{
sector_t zone_offset; /* Zone offset in md_dev */
sector_t zone_start; /* Zone offset in md_dev (in sectors) */
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 */
Expand Down

0 comments on commit 3f1b21c

Please sign in to comment.