In repair phase 5, inject_lost_blocks takes the blocks that we allocated
but didn't use for constructing the new AG btrees and puts them back in
the filesystem by adding them to the free space. The only btree that
can overestimate like that are the free space btrees, but in principle,
any of the btrees can do that. If the others did, the rmap record owner
for those blocks won't necessarily be OWNER_AG, and if it isn't, repair
will fail.
Get rid of this logic bomb so that we can use it for /any/ block count
overestimation, and then we can use it to clean up after all
reconstruction of any btree type.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
if (error)
goto out_cancel;
- error = -libxfs_free_extent(tp, *fsb, 1, &XFS_RMAP_OINFO_AG,
- XFS_AG_RESV_NONE);
+ error = -libxfs_free_extent(tp, *fsb, 1,
+ &XFS_RMAP_OINFO_ANY_OWNER, XFS_AG_RESV_NONE);
if (error)
goto out_cancel;