Commit d99af4f1 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Call bch2_inconsistent_error() on missing stripe/indirect extent

Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 3dea728c
......@@ -902,6 +902,7 @@ static int bch2_mark_stripe_ptr(struct bch_fs *c,
spin_unlock(&c->ec_stripes_heap_lock);
bch_err_ratelimited(c, "pointer to nonexistent stripe %llu",
(u64) p.idx);
bch2_inconsistent_error(c);
return -EIO;
}
......@@ -1019,6 +1020,7 @@ static int bch2_mark_stripe(struct bch_fs *c,
if (!m || (old_s && !m->alive)) {
bch_err_ratelimited(c, "error marking nonexistent stripe %zu",
idx);
bch2_inconsistent_error(c);
return -1;
}
......@@ -1503,6 +1505,7 @@ static int bch2_trans_mark_stripe_ptr(struct btree_trans *trans,
bch2_fs_inconsistent(c,
"pointer to nonexistent stripe %llu",
(u64) p.ec.idx);
bch2_inconsistent_error(c);
ret = -EIO;
goto out;
}
......@@ -1743,6 +1746,7 @@ static int __bch2_trans_mark_reflink_p(struct btree_trans *trans,
bch2_fs_inconsistent(c,
"%llu:%llu len %u points to nonexistent indirect extent %llu",
p.k->p.inode, p.k->p.offset, p.k->size, idx);
bch2_inconsistent_error(c);
ret = -EIO;
goto err;
}
......
......@@ -1960,6 +1960,7 @@ int __bch2_read_indirect_extent(struct btree_trans *trans,
k.k->type != KEY_TYPE_indirect_inline_data) {
bch_err_inum_ratelimited(trans->c, orig_k->k->k.p.inode,
"pointer to nonexistent indirect extent");
bch2_inconsistent_error(trans->c);
ret = -EIO;
goto 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