]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
xfs: update rmap to allow cow staging extents in the rt rmap
authorDarrick J. Wong <djwong@kernel.org>
Thu, 21 Nov 2024 00:20:57 +0000 (16:20 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 23 Dec 2024 21:06:12 +0000 (13:06 -0800)
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>
fs/xfs/libxfs/xfs_rmap.c

index f8415fd96cc2aa48a0d1f79cb00a1d68ab56656d..3cdf50563fecb981e9f479c3a6216b079bc2c35d 100644 (file)
@@ -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;
        }