[PATCH 2/2] nvme: cancel the queue limit update when nvme_update_zone_info fails

Keith Busch kbusch at kernel.org
Wed Mar 27 11:01:42 PDT 2024


On Wed, Mar 27, 2024 at 06:21:45PM +0100, Christoph Hellwig wrote:
> @@ -2115,6 +2115,7 @@ static int nvme_update_ns_info_block(struct nvme_ns *ns,
>  	    ns->head->ids.csi == NVME_CSI_ZNS) {
>  		ret = nvme_update_zone_info(ns, lbaf, &lim);
>  		if (ret) {
> +			queue_limits_cancel_update(ns->disk->queue);

Could you instead move nvme_update_zone_info() outside the
queue_limits_start_update()? That way we wouldn't need to "cancel" the
update. You'd just need to save a copy of "mor" and "mar" in the ns
instead of writing these directly to the queue_limits.



More information about the Linux-nvme mailing list