[PATCH v3 1/3] block: introduce zone_write_granularity limit

Damien Le Moal Damien.LeMoal at wdc.com
Mon Jan 25 00:34:59 EST 2021


On 2021/01/25 14:32, Damien Le Moal wrote:
> On 2021/01/24 19:07, Christoph Hellwig wrote:
>> On Fri, Jan 22, 2021 at 08:56:58AM +0000, Damien Le Moal wrote:
>>>> This looks a little strange.  If we special case zoned vs not zoned
>>>> here anyway, why not set the zone_write_granularity to the logical
>>>> block size here by default.
>>>
>>> The convention is zone_write_granularity == 0 for the BLK_ZONED_NONE case. Hence
>>> the reset here if we force the zoned model to none for HA drives. This way, this
>>> does not create a special case for HA drives used as regular disks.
>>
>> Just inititialize it for all cases if you initialize it for some here.
>> That way everyone but sd already gets a right default and life becomes
>> simpler.
> 
> True for nullblk, and that also simplifies sd a little. But not for nvme,
> blk_queue_set_zoned() is not used AND nvme_update_zone_info() is called before
> nvme_update_disk_info() where the NS logical block size is set. So some
> surgery/cleanups would be needed to benefit. I could add a cleanup for this, but
> not entirely sure if calling nvme_update_zone_info() after
> nvme_update_disk_info() is OK. Thoughts ?

Also, because nvme_update_zone_info() is called without the logical block size
being set yet, this patch was not good for ZNS.




-- 
Damien Le Moal
Western Digital Research



More information about the Linux-nvme mailing list