]> 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, 28 Apr 2022 19:39:03 +0000 (15:39 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Thu, 28 Apr 2022 19:39:03 +0000 (15:39 -0400)
commit4a9e48bf15f990c30816465e3a09b8cb1ec0ff26
treedfa0c3005dd99983614467f0fa35eeefbed4d8c0
parent3024d6c9336827791a0e67d274d2946a1159ec2d
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: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_btree.c
libxfs/xfs_btree.h
libxfs/xfs_rmap_btree.c
libxfs/xfs_trans_resv.c
libxfs/xfs_trans_space.h