diff options
author | Darrick J. Wong <djwong@kernel.org> | 2022-07-14 11:16:01 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2022-10-14 14:17:22 -0700 |
commit | efea324d8ed3564d4c7b38c9f603a02ef660a252 (patch) | |
tree | c1101c2a455bbaa3fc74a94ce2629b0ef94c0bbd | |
parent | 3a83e2bc7258983158d69f7768ecc50bb8406f34 (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.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_rmap.c b/fs/xfs/libxfs/xfs_rmap.c index 31f34cf42413..3e181de29b70 100644 --- a/fs/xfs/libxfs/xfs_rmap.c +++ b/fs/xfs/libxfs/xfs_rmap.c @@ -270,6 +270,12 @@ xfs_rmap_get_rec( goto out_bad_rec; if (irec->rm_offset != 0) goto out_bad_rec; + } else if (irec->rm_owner == XFS_RMAP_OWN_COW) { + if (!xfs_has_rtreflink(mp)) + goto out_bad_rec; + if (!xfs_verify_rgbext(rtg, irec->rm_startblock, + irec->rm_blockcount)) + goto out_bad_rec; } else { if (!xfs_verify_rgbext(rtg, irec->rm_startblock, irec->rm_blockcount)) |