aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/fs/xfs/libxfs/xfs_rmap.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2024-11-20 16:20:43 -0800
committerDarrick J. Wong <djwong@kernel.org>2024-12-23 13:06:09 -0800
commit4a61f12eb11958f157e054d386466627445644cd (patch)
treea1ffe19a61e6960c3eedcb41c8b3b055116258c8 /fs/xfs/libxfs/xfs_rmap.c
parentxfs: online repair of the realtime rmap btree (diff)
downloadwireguard-linux-4a61f12eb11958f157e054d386466627445644cd.tar.xz
wireguard-linux-4a61f12eb11958f157e054d386466627445644cd.zip
xfs: create a shadow rmap btree during realtime rmap repair
Create an in-memory btree of rmap records instead of an array. This enables us to do live record collection instead of freezing the fs. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/libxfs/xfs_rmap.c')
-rw-r--r--fs/xfs/libxfs/xfs_rmap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_rmap.c b/fs/xfs/libxfs/xfs_rmap.c
index 2f0688a57991..f8415fd96cc2 100644
--- a/fs/xfs/libxfs/xfs_rmap.c
+++ b/fs/xfs/libxfs/xfs_rmap.c
@@ -327,7 +327,8 @@ xfs_rmap_check_btrec(
struct xfs_btree_cur *cur,
const struct xfs_rmap_irec *irec)
{
- if (xfs_btree_is_rtrmap(cur->bc_ops))
+ if (xfs_btree_is_rtrmap(cur->bc_ops) ||
+ xfs_btree_is_mem_rtrmap(cur->bc_ops))
return xfs_rtrmap_check_irec(to_rtg(cur->bc_group), irec);
return xfs_rmap_check_irec(to_perag(cur->bc_group), irec);
}