diff mbox series

[01/22] libxfs: compute the rt refcount btree maxlevels during initialization

Message ID 173888088950.2741962.6915597562604311279.stgit@frogsfrogsfrogs (mailing list archive)
State Not Applicable, archived
Headers show
Series [01/22] libxfs: compute the rt refcount btree maxlevels during initialization | expand

Commit Message

Darrick J. Wong Feb. 6, 2025, 10:57 p.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

Compute max rt refcount btree height information when we set up libxfs.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 libxfs/init.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Christoph Hellwig Feb. 13, 2025, 4:20 a.m. UTC | #1
Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>
diff mbox series

Patch

diff --git a/libxfs/init.c b/libxfs/init.c
index f92805620c33f1..00bd46a6013e28 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);