summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2021-09-01 11:18:42 -0700
committerDarrick J. Wong <djwong@kernel.org>2021-10-22 16:41:08 -0700
commitc700bf855784c9fee4053a4f1b24ad199062795e (patch)
tree9df99a85d283aac45486ed1d49617b218bbde355
parent562fe8768e7e88d8b8f0c3cb9435924ea2e551c4 (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>
-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 cc5969e8c8be..f7d6ef846d9d 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_has_rtreflink(mp) ||
+ 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)