Lines Matching defs:zone

42 	pr_debug("md: RAID0 configuration for %s - %d zone%s\n",
52 pr_debug("md: zone%d=[%s]\n", j, line);
55 pr_debug(" zone-offset=%10lluKB, device-offset=%10lluKB, size=%10lluKB\n",
68 struct strip_zone *zone;
152 /* The first zone must contain all devices, so here we check that
155 zone = &conf->strip_zone[0];
203 zone->nb_dev = cnt;
204 zone->zone_end = smallest->sectors * cnt;
206 curr_zone_end = zone->zone_end;
213 zone = conf->strip_zone + i;
216 pr_debug("md/raid0:%s: zone %d\n", mdname(mddev), i);
217 zone->dev_start = smallest->sectors;
223 if (rdev->sectors <= zone->dev_start) {
243 zone->nb_dev = c;
244 sectors = (smallest->sectors - zone->dev_start) * c;
245 pr_debug("md/raid0:%s: zone->nb_dev: %d, sectors: %llu\n",
247 zone->nb_dev, (unsigned long long)sectors);
250 zone->zone_end = curr_zone_end;
252 pr_debug("md/raid0:%s: current zone start: %llu\n",
266 pr_err("md/raid0:%s: cannot assemble multi-zone RAID0 with default_layout setting\n",
278 zone = conf->strip_zone + i;
279 /* disk_shift is first disk index used in the zone */
280 zone->disk_shift = sector_div(first_sector,
281 zone->nb_dev);
297 /* Find the zone which holds a particular offset
298 * Update *sectorp to be an offset in that zone
320 static struct md_rdev *map_sector(struct mddev *mddev, struct strip_zone *zone,
334 /* chunk in zone */
337 sector_div(chunk, zone->nb_dev << chunksect_bits);
341 sector_div(chunk, chunk_sects * zone->nb_dev);
345 * real sector = chunk in device + starting of zone
349 return conf->devlist[(zone - conf->strip_zone)*raid_disks
350 + sector_div(sector, zone->nb_dev)];
456 struct strip_zone *zone;
469 zone = find_zone(conf, &start);
471 if (bio_end_sector(bio) > zone->zone_end) {
473 zone->zone_end - bio->bi_iter.bi_sector, GFP_NOIO,
478 end = zone->zone_end;
483 if (zone != conf->strip_zone)
484 end = end - zone[-1].zone_end;
486 /* Now start and end is the offset in zone */
487 stripe_size = zone->nb_dev * mddev->chunk_sectors;
494 /* In the first zone the original and alternate layouts are the same */
495 if ((conf->layout == RAID0_ORIG_LAYOUT) && (zone != conf->strip_zone)) {
497 start_disk_index = sector_div(orig_start, zone->nb_dev);
499 zone->nb_dev,
500 zone->disk_shift);
502 end_disk_index = sector_div(orig_end, zone->nb_dev);
504 zone->nb_dev, zone->disk_shift);
518 for (disk = 0; disk < zone->nb_dev; disk++) {
523 compare_disk = map_disk_shift(disk, zone->nb_dev,
524 zone->disk_shift);
544 rdev = conf->devlist[(zone - conf->strip_zone) *
547 dev_start + zone->dev_start + rdev->data_offset,
556 struct strip_zone *zone;
563 zone = find_zone(mddev->private, &sector);
566 tmp_dev = map_sector(mddev, zone, bio_sector, &sector);
569 tmp_dev = map_sector(mddev, zone, sector, &sector);
584 bio->bi_iter.bi_sector = sector + zone->dev_start +