[PATCH v3 04/15] block: introduce disk_report_zone()

Chaitanya Kulkarni chaitanyak at nvidia.com
Mon Nov 3 20:05:10 PST 2025


On 11/3/25 17:31, Damien Le Moal wrote:
> Commit b76b840fd933 ("dm: Fix dm-zoned-reclaim zone write pointer
> alignment") introduced an indirect call for the callback function of a
> report zones executed with blkdev_report_zones(). This is necessary so
> that the function disk_zone_wplug_sync_wp_offset() can be called to
> refresh a zone write plug zone write pointer offset after a write error.
> However, this solution makes following the path of a zone information
> harder to understand.
>
> Clean this up by introducing the new blk_report_zones_args structure to
> define a zone report callback and its private data and introduce the
> helper function disk_report_zone() which calls both
> disk_zone_wplug_sync_wp_offset() and the zone report user callback
> function for all zones of a zone report. This helper function must be
> called by all block device drivers that implement the report zones
> block operation in order to correctly report a zone information.
>
> All block device drivers supporting the report_zones block operation are
> updated to use this new scheme.
>
> 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