From 3209f6f1d3f8325c1851d76ee557ec6c085e56f0 Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Mon, 24 Feb 2025 10:21:53 -0800 Subject: [PATCH] xfs: update rmap to allow cow staging extents in the rt rmap Source kernel commit: 0bada82331238bd366aaa0566d125c6338b42590 Don't error out on CoW staging extent records when realtime reflink is enabled. Signed-off-by: "Darrick J. Wong" Reviewed-by: Christoph Hellwig --- libxfs/xfs_rmap.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libxfs/xfs_rmap.c b/libxfs/xfs_rmap.c index 3748bfc7..8c0c22a3 100644 --- a/libxfs/xfs_rmap.c +++ b/libxfs/xfs_rmap.c @@ -284,6 +284,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; } -- 2.47.2