Commit 34c1cd6a authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Fix for fsck spuriously finding duplicate extents

Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 2e9f3b88
......@@ -485,7 +485,11 @@ static int check_extents(struct bch_fs *c)
BTREE_ITER_INTENT);
retry:
for_each_btree_key_continue(iter, 0, k, ret) {
if (bkey_cmp(prev.k->k.p, bkey_start_pos(k.k)) > 0) {
/*
* due to retry errors we might see the same extent twice:
*/
if (bkey_cmp(prev.k->k.p, k.k->p) &&
bkey_cmp(prev.k->k.p, bkey_start_pos(k.k)) > 0) {
char buf1[200];
char buf2[200];
......
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