On 2020/04/30 23:45, Hannes Reinecke wrote: >>> +unsigned int dmz_dev_zone_id(struct dmz_metadata *zmd, struct dm_zone *zone) >>> +{ >>> + unsigned int zone_id; >>> + >>> + if (WARN_ON(!zone)) >>> + return 0; >>> + >>> + zone_id = zone->id; >>> + if (zmd->nr_devs > 1 && >>> + (zone_id >= zmd->dev[1].zone_offset)) >>> + zone_id -= zmd->dev[1].zone_offset; >> >> We could have this as: >> >> if (zone_id >= zmd->dev[0].nr_zones) >> zone_id -= zmd->dev[0].nr_zones; >> >> No ? It is simpler and we can kill the zone_offset. >> > Yes, but it will make the device arrangement implicit; by specifying > the block offset we allow us the option of possibly moving the block > offset into the metadata, and then having the metadata specifying the > layout. > Something which I'd like to keep as I have this weird idea of using > other, non-standard, drives, too, which then would require a more > complex layout. OK. Got it. Let's keep this as is then. -- Damien Le Moal Western Digital Research -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel