xfs: use interval query for rmap alloc operations on shared files
When it's possible for reverse mappings to overlap (data fork extents of files on reflink filesystems), use the interval query function to find the left neighbor of an extent we're trying to add; and be careful to use the lookup functions to update the neighbors and/or add new extents. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
@@ -484,9 +484,15 @@ xfs_rui_recover(
|
||||
case XFS_RMAP_EXTENT_MAP:
|
||||
type = XFS_RMAP_MAP;
|
||||
break;
|
||||
case XFS_RMAP_EXTENT_MAP_SHARED:
|
||||
type = XFS_RMAP_MAP_SHARED;
|
||||
break;
|
||||
case XFS_RMAP_EXTENT_UNMAP:
|
||||
type = XFS_RMAP_UNMAP;
|
||||
break;
|
||||
case XFS_RMAP_EXTENT_UNMAP_SHARED:
|
||||
type = XFS_RMAP_UNMAP_SHARED;
|
||||
break;
|
||||
case XFS_RMAP_EXTENT_CONVERT:
|
||||
type = XFS_RMAP_CONVERT;
|
||||
break;
|
||||
|
Viittaa uudesa ongelmassa
Block a user