aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid0.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/raid0.c')
-rw-r--r--drivers/md/raid0.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c
index b860536dc894..6e12a358f366 100644
--- a/drivers/md/raid0.c
+++ b/drivers/md/raid0.c
@@ -155,7 +155,7 @@ static int create_strip_zones (mddev_t *mddev)
155 } 155 }
156 zone->nb_dev = cnt; 156 zone->nb_dev = cnt;
157 zone->size = smallest->size * cnt; 157 zone->size = smallest->size * cnt;
158 zone->zone_offset = 0; 158 zone->zone_start = 0;
159 159
160 current_offset = smallest->size; 160 current_offset = smallest->size;
161 curr_zone_offset = zone->size; 161 curr_zone_offset = zone->size;
@@ -194,7 +194,7 @@ static int create_strip_zones (mddev_t *mddev)
194 printk("raid0: zone->nb_dev: %d, size: %llu\n", 194 printk("raid0: zone->nb_dev: %d, size: %llu\n",
195 zone->nb_dev, (unsigned long long)zone->size); 195 zone->nb_dev, (unsigned long long)zone->size);
196 196
197 zone->zone_offset = curr_zone_offset; 197 zone->zone_start = curr_zone_offset * 2;
198 curr_zone_offset += zone->size; 198 curr_zone_offset += zone->size;
199 199
200 current_offset = smallest->size; 200 current_offset = smallest->size;
@@ -437,14 +437,14 @@ static int raid0_make_request (struct request_queue *q, struct bio *bio)
437 zone = conf->hash_table[x]; 437 zone = conf->hash_table[x];
438 } 438 }
439 439
440 while (sector / 2 >= (zone->zone_offset + zone->size)) 440 while (sector / 2 >= (zone->zone_start / 2 + zone->size))
441 zone++; 441 zone++;
442 442
443 sect_in_chunk = bio->bi_sector & (chunk_sects - 1); 443 sect_in_chunk = bio->bi_sector & (chunk_sects - 1);
444 444
445 445
446 { 446 {
447 sector_t x = (sector - zone->zone_offset * 2) >> chunksect_bits; 447 sector_t x = (sector - zone->zone_start) >> chunksect_bits;
448 448
449 sector_div(x, zone->nb_dev); 449 sector_div(x, zone->nb_dev);
450 chunk = x; 450 chunk = x;
@@ -489,8 +489,8 @@ static void raid0_status (struct seq_file *seq, mddev_t *mddev)
489 seq_printf(seq, "%s/", bdevname( 489 seq_printf(seq, "%s/", bdevname(
490 conf->strip_zone[j].dev[k]->bdev,b)); 490 conf->strip_zone[j].dev[k]->bdev,b));
491 491
492 seq_printf(seq, "] zo=%d ds=%d s=%d\n", 492 seq_printf(seq, "] zs=%d ds=%d s=%d\n",
493 conf->strip_zone[j].zone_offset, 493 conf->strip_zone[j].zone_start,
494 conf->strip_zone[j].dev_start, 494 conf->strip_zone[j].dev_start,
495 conf->strip_zone[j].size); 495 conf->strip_zone[j].size);
496 } 496 }