From: Darrick J. Wong Date: Mon, 24 Feb 2025 18:22:02 +0000 (-0800) Subject: libxfs: compute the rt refcount btree maxlevels during initialization X-Git-Tag: v6.14.0~62 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=310df80d8202c04ed070449a8e9464c51a18c9e3;p=thirdparty%2Fxfsprogs-dev.git libxfs: compute the rt refcount btree maxlevels during initialization Compute max rt refcount btree height information when we set up libxfs. Signed-off-by: "Darrick J. Wong" Reviewed-by: Christoph Hellwig --- diff --git a/libxfs/init.c b/libxfs/init.c index f9280562..00bd46a6 100644 --- a/libxfs/init.c +++ b/libxfs/init.c @@ -597,7 +597,8 @@ static inline void xfs_rtbtree_compute_maxlevels( struct xfs_mount *mp) { - mp->m_rtbtree_maxlevels = mp->m_rtrmap_maxlevels; + mp->m_rtbtree_maxlevels = max(mp->m_rtrmap_maxlevels, + mp->m_rtrefc_maxlevels); } /* Compute maximum possible height of all btrees. */ @@ -615,6 +616,7 @@ libxfs_compute_all_maxlevels( xfs_rmapbt_compute_maxlevels(mp); xfs_rtrmapbt_compute_maxlevels(mp); xfs_refcountbt_compute_maxlevels(mp); + xfs_rtrefcountbt_compute_maxlevels(mp); xfs_agbtree_compute_maxlevels(mp); xfs_rtbtree_compute_maxlevels(mp);