]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: compute the maximum height of the rmap btree when reflink enabled
authorDarrick J. Wong <djwong@kernel.org>
Thu, 16 Sep 2021 19:27:43 +0000 (12:27 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 19 Oct 2021 18:45:16 +0000 (11:45 -0700)
commit06124197c3d5e2754ed6ced54a520953803adb3c
treeb1f20b3caabbd484e34057a0566f0d0325abbe0d
parent237a810a6c9be3659b27197cdafc88e9dd26dcc4
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 <djwong@kernel.org>
Reviewed-by: Chandan Babu R <chandan.babu@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/libxfs/xfs_btree.c
fs/xfs/libxfs/xfs_btree.h
fs/xfs/libxfs/xfs_rmap_btree.c
fs/xfs/libxfs/xfs_trans_resv.c
fs/xfs/libxfs/xfs_trans_space.h