]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: compute the maximum height of the rmap btree when reflink enabled
authorDarrick J. Wong <djwong@kernel.org>
Thu, 6 Jan 2022 22:13:21 +0000 (14:13 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 20 Jan 2022 00:02:52 +0000 (16:02 -0800)
commit5bad874f0286c194dc322f79af520c8d21092639
treeb8fc0038e86b5672649a09054a4411f50491d587
parent7aee1c9fa188950f5e6b2e039c96bcf87f4f404b
xfs: compute the maximum height of the rmap btree when reflink enabled

Source kernel commit: 9ec691205e7d4a11190519df6561a168ae6af3a4

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 <djwong@kernel.org>
Reviewed-by: Chandan Babu R <chandan.babu@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
libxfs/xfs_btree.c
libxfs/xfs_btree.h
libxfs/xfs_rmap_btree.c
libxfs/xfs_trans_resv.c
libxfs/xfs_trans_space.h