[PATCH 05/21] nvme: remove nvme_revalidate_zones

Damien Le Moal dlemoal at kernel.org
Wed Feb 28 15:47:05 PST 2024


On 2024/02/28 10:11, Christoph Hellwig wrote:
> Handle setting the zone size / chunk_sectors and max_append_sectors
> limits together with the other ZNS limits, and just open code the
> call to blk_revalidate_zones in the current place.
> 
> Signed-off-by: Christoph Hellwig <hch at lst.de>

Looks good.

Reviewed-by: Damien Le Moal <dlemoal at kernel.org>

[...]

>  static int nvme_set_max_append(struct nvme_ctrl *ctrl)
>  {
>  	struct nvme_command c = { };
> @@ -113,6 +103,8 @@ int nvme_update_zone_info(struct nvme_ns *ns, unsigned lbaf)
>  	blk_queue_flag_set(QUEUE_FLAG_ZONE_RESETALL, q);
>  	disk_set_max_open_zones(ns->disk, le32_to_cpu(id->mor) + 1);
>  	disk_set_max_active_zones(ns->disk, le32_to_cpu(id->mar) + 1);

Not directly related to this patch, but I think that since you moved the max
open & active limits to queue->limits, we really should rename these to
blk_queue_max_open_zones() and blk_queue_max_active_zones() to be consistent
with all the other limits. and may be same for disk_set_zoned() while we are at it.

I can send a patch if you want...

> +	blk_queue_chunk_sectors(ns->queue, ns->head->zsze);
> +	blk_queue_max_zone_append_sectors(ns->queue, ns->ctrl->max_zone_append);
>  free_data:
>  	kfree(id);
>  	return status;

-- 
Damien Le Moal
Western Digital Research




More information about the Linux-nvme mailing list