Commit 1b5453ba authored by Darrick J. Wong's avatar Darrick J. Wong

xfs: support recovering bmap intent items targetting realtime extents

Now that we have reflink on the realtime device, bmap intent items have
to support remapping extents on the realtime volume.
Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
parent 7302cda7
......@@ -435,6 +435,9 @@ xfs_bui_validate(
if (!xfs_verify_fileext(mp, map->me_startoff, map->me_len))
return false;
if (map->me_flags & XFS_BMAP_EXTENT_REALTIME)
return xfs_verify_rtbext(mp, map->me_startblock, map->me_len);
return xfs_verify_fsbext(mp, map->me_startblock, map->me_len);
}
......@@ -510,6 +513,12 @@ xfs_bmap_recover_work(
xfs_ilock(ip, XFS_ILOCK_EXCL);
xfs_trans_ijoin(tp, ip, 0);
if (!!(map->me_flags & XFS_BMAP_EXTENT_REALTIME) !=
xfs_ifork_is_realtime(ip, work->bi_whichfork)) {
error = -EFSCORRUPTED;
goto err_cancel;
}
if (work->bi_type == XFS_BMAP_MAP)
iext_delta = XFS_IEXT_ADD_NOSPLIT_CNT;
else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment