[dm-devel] [PATCH 13/13] dm-zoned: metadata version 2
Damien Le Moal
Damien.LeMoal at wdc.com
Fri May 1 00:15:13 UTC 2020
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
More information about the dm-devel
mailing list