[PATCH v3 02/15] block: freeze queue when updating zone resources

Chaitanya Kulkarni chaitanyak at nvidia.com
Mon Nov 3 20:04:39 PST 2025


On 11/3/25 17:31, Damien Le Moal wrote:
> Modify disk_update_zone_resources() to freeze the device queue before
> updating the number of zones, zone capacity and other zone related
> resources. The locking order resulting from the call to
> queue_limits_commit_update_frozen() is preserved, that is, the queue
> limits lock is first taken by calling queue_limits_start_update() before
> freezing the queue, and the queue is unfrozen after executing
> queue_limits_commit_update(), which replaces the call to
> queue_limits_commit_update_frozen().
>
> This change ensures that there are no in-flights I/Os when the zone
> resources are updated due to a zone revalidation. In case of error when
> the limits are applied, directly call disk_free_zone_resources() from
> disk_update_zone_resources() while the disk queue is still frozen to
> avoid needing to freeze & unfreeze the queue again in
> blk_revalidate_disk_zones(), thus simplifying that function code a
> little.
>
> Fixes: 0b83c86b444a ("block: Prevent potential deadlock in blk_revalidate_disk_zones()")
> Cc:stable at vger.kernel.org
> Signed-off-by: Damien Le Moal<dlemoal at kernel.org>
> Reviewed-by: Christoph Hellwig<hch at lst.de>
> Reviewed-by: Johannes Thumshirn<johannes.thumshirn at wdc.com>


Looks good.

Reviewed-by: Chaitanya Kulkarni <kch at nvidia.com>

-ck




More information about the Linux-nvme mailing list