summaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_rtrmap_btree.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2024-11-20 16:20:27 -0800
committerDarrick J. Wong <djwong@kernel.org>2024-12-23 13:06:05 -0800
commit6b08901a6e8fcda555f3ad39abd73bb0dd37f231 (patch)
tree96a2e90bfb0fb89a53de83bf59464bf0921163c8 /fs/xfs/libxfs/xfs_rtrmap_btree.c
parent702c90f451622384d6c65897b619f647704b06a9 (diff)
xfs: add realtime reverse map inode to metadata directory
Add a metadir path to select the realtime rmap btree inode and load it at mount time. The rtrmapbt inode will have a unique extent format code, which means that we also have to update the inode validation and flush routines to look for it. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/libxfs/xfs_rtrmap_btree.c')
-rw-r--r--fs/xfs/libxfs/xfs_rtrmap_btree.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/xfs/libxfs/xfs_rtrmap_btree.c b/fs/xfs/libxfs/xfs_rtrmap_btree.c
index 99d828bb5fe7c..22aabf326b2cc 100644
--- a/fs/xfs/libxfs/xfs_rtrmap_btree.c
+++ b/fs/xfs/libxfs/xfs_rtrmap_btree.c
@@ -18,6 +18,7 @@
#include "xfs_alloc.h"
#include "xfs_btree.h"
#include "xfs_btree_staging.h"
+#include "xfs_metafile.h"
#include "xfs_rmap.h"
#include "xfs_rtrmap_btree.h"
#include "xfs_trace.h"
@@ -405,12 +406,10 @@ xfs_rtrmapbt_init_cursor(
struct xfs_trans *tp,
struct xfs_rtgroup *rtg)
{
- struct xfs_inode *ip = NULL;
+ struct xfs_inode *ip = rtg_rmap(rtg);
struct xfs_mount *mp = rtg_mount(rtg);
struct xfs_btree_cur *cur;
- return NULL; /* XXX */
-
xfs_assert_ilocked(ip, XFS_ILOCK_SHARED | XFS_ILOCK_EXCL);
cur = xfs_btree_alloc_cursor(mp, tp, &xfs_rtrmapbt_ops,
@@ -439,6 +438,7 @@ xfs_rtrmapbt_commit_staged_btree(
int flags = XFS_ILOG_CORE | XFS_ILOG_DBROOT;
ASSERT(cur->bc_flags & XFS_BTREE_STAGING);
+ ASSERT(ifake->if_fork->if_format == XFS_DINODE_FMT_META_BTREE);
/*
* Free any resources hanging off the real fork, then shallow-copy the