xfs: compute maximum AG btree height for critical reservation calculation
authorDarrick J. Wong <djwong@kernel.org>
Thu, 16 Sep 2021 19:27:34 +0000 (12:27 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 19 Oct 2021 18:45:15 +0000 (11:45 -0700)
commitb74e15d720d0764345934ebb599a99a077c52533
treec57f72b02abd7757e6dd30d7a33095d06ec4c2c1
parent7cb3efb4cfdd4f3eb1f36b0ce39254b848ff2371
xfs: compute maximum AG btree height for critical reservation calculation

Compute the actual maximum AG btree height for deciding if a per-AG
block reservation is critically low.  This only affects the sanity check
condition, since we /generally/ will trigger on the 10% threshold.  This
is a long-winded way of saying that we're removing one more usage of
XFS_BTREE_MAXLEVELS.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/libxfs/xfs_ag_resv.c
fs/xfs/xfs_mount.c
fs/xfs/xfs_mount.h