summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_mount.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2021-09-01 11:18:08 -0700
committerDarrick J. Wong <djwong@kernel.org>2021-12-15 17:29:20 -0800
commit5702b346103a7dc05db30a16448118e69a1aef53 (patch)
treeb9e3371df6244f14fe8fc86157018bdb81b697e8 /fs/xfs/xfs_mount.c
parentea3df376c6237db0069d334d89b0660044aca27e (diff)
xfs: define the on-disk realtime refcount btree format
Start filling out the rtrefcount btree implementation. Start with the on-disk btree format; add everything needed to read, write and manipulate refcount btree blocks. This prepares the way for connecting the btree operations implementation. Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_mount.c')
-rw-r--r--fs/xfs/xfs_mount.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index f942efe56533..8c4975556a73 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -35,6 +35,7 @@
#include "xfs_ag.h"
#include "xfs_imeta.h"
#include "xfs_rtrmap_btree.h"
+#include "xfs_rtrefcount_btree.h"
static DEFINE_MUTEX(xfs_uuid_table_mutex);
static int xfs_uuid_table_size;
@@ -614,7 +615,10 @@ static inline void
xfs_rtbtree_compute_maxlevels(
struct xfs_mount *mp)
{
- mp->m_rtbtree_maxlevels = mp->m_rtrmap_maxlevels;
+ unsigned int levels;
+
+ levels = max(mp->m_rtrmap_maxlevels, mp->m_rtrefc_maxlevels);
+ mp->m_rtbtree_maxlevels = levels;
}
/*
@@ -688,6 +692,7 @@ xfs_mountfs(
xfs_rmapbt_compute_maxlevels(mp);
xfs_rtrmapbt_compute_maxlevels(mp);
xfs_refcountbt_compute_maxlevels(mp);
+ xfs_rtrefcountbt_compute_maxlevels(mp);
xfs_agbtree_compute_maxlevels(mp);
xfs_rtbtree_compute_maxlevels(mp);