From beb6a0d4c119eac63b14d6130e39e769852ee1f4 Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Wed, 1 Sep 2021 11:15:53 -0700 Subject: xfs: compute the maximum height of the rmap btree when reflink enabled Instead of assuming that the hardcoded XFS_BTREE_MAXLEVELS value is big enough to handle the maximally tall rmap btree when all blocks are in use and maximally shared, let's compute the maximum height assuming the rmapbt consumes as many blocks as possible. Signed-off-by: Darrick J. Wong --- fs/xfs/xfs_mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/xfs/xfs_mount.c') diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c index ccf833ccb50f..4519c0621df7 100644 --- a/fs/xfs/xfs_mount.c +++ b/fs/xfs/xfs_mount.c @@ -664,7 +664,7 @@ xfs_mountfs( xfs_bmap_compute_maxlevels(mp, XFS_DATA_FORK); xfs_bmap_compute_maxlevels(mp, XFS_ATTR_FORK); xfs_mount_setup_inode_geom(mp); - xfs_rmapbt_compute_maxlevels(mp); + mp->m_rmap_maxlevels = xfs_rmapbt_compute_maxlevels(mp); xfs_refcountbt_compute_maxlevels(mp); /* -- cgit v1.2.3