xfs: don't assume a left rmap when allocating a new rmap
The original rmap code assumed that there would always be at least one rmap in the rmapbt (the AG sb/agf/agi) and so errored out if it didn't find one. This assumption isn't true for the rmapbt repair function (and it won't be true for realtime rmap either), so remove the check and just deal with the situation. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
This commit is contained in:
parent
efe8032773
commit
fa248de98a
|
@ -753,8 +753,7 @@ xfs_rmap_map(
|
|||
&have_lt);
|
||||
if (error)
|
||||
goto out_error;
|
||||
XFS_WANT_CORRUPTED_GOTO(mp, have_lt == 1, out_error);
|
||||
|
||||
if (have_lt) {
|
||||
error = xfs_rmap_get_rec(cur, <rec, &have_lt);
|
||||
if (error)
|
||||
goto out_error;
|
||||
|
@ -766,6 +765,7 @@ xfs_rmap_map(
|
|||
|
||||
if (!xfs_rmap_is_mergeable(<rec, owner, flags))
|
||||
have_lt = 0;
|
||||
}
|
||||
|
||||
XFS_WANT_CORRUPTED_GOTO(mp,
|
||||
have_lt == 0 ||
|
||||
|
|
Loading…
Reference in New Issue