Re: [PATCH v3 02/14] block: Exclude conventional zones when faking max open limit

Hannes Reinecke
2024-05-02T05:52:08Z

On 5/1/24 13:08, Damien Le Moal wrote:
> For a device that has no limits for the maximum number of open and
> active zones, we default to using the number of zones, limited to
> BLK_ZONE_WPLUG_DEFAULT_POOL_SIZE (128), for the maximum number of open
> zones indicated to the user. However, for a device that has conventional
> zones and less zones than BLK_ZONE_WPLUG_DEFAULT_POOL_SIZE, we should
> not account conventional zones and set the limit to the number of
> sequential write required zones. Furthermore, for cases where the limit
> is equal to the number of sequential write required zones, we can
> advertize a limit of 0 to indicate "no limits".
>
> Fix this by moving the zone write plug mempool resizing from
> disk_revalidate_zone_resources() to disk_update_zone_resources() where
> we can safely compute the number of conventional zones and update the
> limits.
>
> Fixes: 843283e96e5a ("block: Fake max open zones limit when there is no limit")
> Reported-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
> ---
> block/blk-zoned.c | 38 ++++++++++++++++++++++++++++----------
> 1 file changed, 28 insertions(+), 10 deletions(-)
>
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich