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

bcachefs: Improve an error message

When we detect an invalid key being inserted, we should print what code
was doing the update.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
parent cab8e233
...@@ -577,7 +577,9 @@ static inline int do_bch2_trans_commit(struct btree_trans *trans, ...@@ -577,7 +577,9 @@ static inline int do_bch2_trans_commit(struct btree_trans *trans,
char buf[200]; char buf[200];
bch2_bkey_val_to_text(&PBUF(buf), c, bkey_i_to_s_c(i->k)); bch2_bkey_val_to_text(&PBUF(buf), c, bkey_i_to_s_c(i->k));
bch_err(c, "invalid bkey %s on insert: %s\n", buf, invalid); bch_err(c, "invalid bkey %s on insert from %ps -> %ps: %s\n",
buf, (void *) trans->ip,
(void *) i->ip_allocated, invalid);
bch2_fatal_error(c); bch2_fatal_error(c);
} }
btree_insert_entry_checks(trans, i); btree_insert_entry_checks(trans, i);
......
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