Commit eab3a3ce authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: Fix overlapping extent repair

overlapping extent repair was colliding with extent past end of inode
checks - don't update "extent ends at" until we know we have an extent.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 8ce1db80
...@@ -1372,10 +1372,6 @@ static int check_overlapping_extents(struct btree_trans *trans, ...@@ -1372,10 +1372,6 @@ static int check_overlapping_extents(struct btree_trans *trans,
goto err; goto err;
} }
ret = extent_ends_at(c, extent_ends, seen, k);
if (ret)
goto err;
extent_ends->last_pos = k.k->p; extent_ends->last_pos = k.k->p;
err: err:
return ret; return ret;
...@@ -1505,6 +1501,12 @@ static int check_extent(struct btree_trans *trans, struct btree_iter *iter, ...@@ -1505,6 +1501,12 @@ static int check_extent(struct btree_trans *trans, struct btree_iter *iter,
i->seen_this_pos = true; i->seen_this_pos = true;
} }
if (k.k->type != KEY_TYPE_whiteout) {
ret = extent_ends_at(c, extent_ends, s, k);
if (ret)
goto err;
}
out: out:
err: err:
fsck_err: fsck_err:
......
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