summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2021-01-05 17:47:03 -0800
committerDarrick J. Wong <djwong@kernel.org>2021-03-25 17:08:50 -0700
commitd815771ba45d54468536c3c419882946a1fe53fb (patch)
tree59a3dc7aba69b615f2d5ac726fd0359201d94272 /fs
parent866904661319be1add6e9acb8e1e33b80543a3d3 (diff)
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/libxfs/xfs_rmap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_rmap.c b/fs/xfs/libxfs/xfs_rmap.c
index f49dfe074e2c..3740d7ca6bd5 100644
--- a/fs/xfs/libxfs/xfs_rmap.c
+++ b/fs/xfs/libxfs/xfs_rmap.c
@@ -267,7 +267,9 @@ xfs_rmap_get_rec(
if (!xfs_verify_rtbno(mp,
irec->rm_startblock + irec->rm_blockcount - 1))
goto out_bad_rec;
- if (XFS_RMAP_NON_INODE_OWNER(irec->rm_owner))
+ if (XFS_RMAP_NON_INODE_OWNER(irec->rm_owner) &&
+ (!xfs_sb_version_hasrtreflink(&mp->m_sb) ||
+ irec->rm_owner != XFS_RMAP_OWN_COW))
goto out_bad_rec;
} else if (irec->rm_startblock <= XFS_AGFL_BLOCK(mp)) {
if (irec->rm_owner != XFS_RMAP_OWN_FS)