[PATCH v3 15/15] xfs: use blkdev_report_zones_cached()
Hannes Reinecke
hare at suse.de
Tue Nov 4 23:14:06 PST 2025
On 11/4/25 02:31, Damien Le Moal wrote:
> Modify xfs_mount_zones() to replace the call to blkdev_report_zones()
> with blkdev_report_zones_cached() to speed-up mount operations.
>
> With this change, mounting a freshly formatted large capacity (30 TB)
> SMR HDD completes under 2s compared to over 4.7s before.
>
> 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>
> ---
> fs/xfs/xfs_zone_alloc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/xfs/xfs_zone_alloc.c b/fs/xfs/xfs_zone_alloc.c
> index 23cdab4515bb..8d819bc134cd 100644
> --- a/fs/xfs/xfs_zone_alloc.c
> +++ b/fs/xfs/xfs_zone_alloc.c
> @@ -1231,7 +1231,7 @@ xfs_mount_zones(
> trace_xfs_zones_mount(mp);
>
> if (bdev_is_zoned(bt->bt_bdev)) {
> - error = blkdev_report_zones(bt->bt_bdev,
> + error = blkdev_report_zones_cached(bt->bt_bdev,
> XFS_FSB_TO_BB(mp, mp->m_sb.sb_rtstart),
> mp->m_sb.sb_rgcount, xfs_get_zone_info_cb, &iz);
> if (error < 0)
Reviewed-by: Hannes Reinecke <hare at suse.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare at suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
More information about the Linux-nvme
mailing list