[PATCH v3 01/15] block: handle zone management operations completions

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


On 11/3/25 17:31, Damien Le Moal wrote:
> The functions blk_zone_wplug_handle_reset_or_finish() and
> blk_zone_wplug_handle_reset_all() both modify the zone write pointer
> offset of zone write plugs that are the target of a reset, reset all or
> finish zone management operation. However, these functions do this
> modification before the BIO is executed. So if the zone operation fails,
> the modified zone write pointer offsets become invalid.
>
> Avoid this by modifying the zone write pointer offset of a zone write
> plug that is the target of a zone management operation when the
> operation completes. To do so, modify blk_zone_bio_endio() to call the
> new function blk_zone_mgmt_bio_endio() which in turn calls the functions
> blk_zone_reset_all_bio_endio(), blk_zone_reset_bio_endio() or
> blk_zone_finish_bio_endio() depending on the operation of the completed
> BIO, to modify a zone write plug write pointer offset accordingly.
> These functions are called only if the BIO execution was successful.
>
> Fixes: dd291d77cc90 ("block: Introduce zone write plugging")
> 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