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<[email protected]>
> Reviewed-by: Christoph Hellwig<[email protected]>
> Reviewed-by: Johannes Thumshirn<[email protected]>Looks good. Reviewed-by: Chaitanya Kulkarni <[email protected]> -ck
