}
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;
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;
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;
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);
}
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 */