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:57 -0800
committerDarrick J. Wong <djwong@kernel.org>2024-12-23 13:06:12 -0800
commit0bada82331238bd366aaa0566d125c6338b42590 (patch)
tree642a8a83c31f2ec5cf0d44db7e004b718d2c6477 /fs/xfs/libxfs/xfs_rmap.c
parentxfs: create routine to allocate and initialize a realtime refcount btree inode (diff)
downloadwireguard-linux-0bada82331238bd366aaa0566d125c6338b42590.tar.xz
wireguard-linux-0bada82331238bd366aaa0566d125c6338b42590.zip
xfs: update rmap to allow cow staging extents in the rt rmap
Don't error out on CoW staging extent records when realtime reflink is enabled. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to '')
-rw-r--r--fs/xfs/libxfs/xfs_rmap.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_rmap.c b/fs/xfs/libxfs/xfs_rmap.c
index f8415fd96cc2..3cdf50563fec 100644
--- a/fs/xfs/libxfs/xfs_rmap.c
+++ b/fs/xfs/libxfs/xfs_rmap.c
@@ -285,6 +285,13 @@ xfs_rtrmap_check_meta_irec(
if (irec->rm_blockcount != mp->m_sb.sb_rextsize)
return __this_address;
return NULL;
+ case XFS_RMAP_OWN_COW:
+ if (!xfs_has_rtreflink(mp))
+ return __this_address;
+ if (!xfs_verify_rgbext(rtg, irec->rm_startblock,
+ irec->rm_blockcount))
+ return __this_address;
+ return NULL;
default:
return __this_address;
}