Skip to content

Commit 9773547

Browse files
author
Kent Overstreet
committed
bcachefs: Convert disk accounting BUG_ON() to WARN_ON()
We had a bug where disk accounting keys didn't always have their version field set in journal replay; change the BUG_ON() to a WARN(), and exclude this case since it's now checked for elsewhere (in the bkey validate function). Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
1 parent a3581ca commit 9773547

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/bcachefs/disk_accounting.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ int bch2_accounting_read(struct bch_fs *c)
648648
if (i + 1 < &darray_top(*keys) &&
649649
i[1].k->k.type == KEY_TYPE_accounting &&
650650
!journal_key_cmp(i, i + 1)) {
651-
BUG_ON(bversion_cmp(i[0].k->k.bversion, i[1].k->k.bversion) >= 0);
651+
WARN_ON(bversion_cmp(i[0].k->k.bversion, i[1].k->k.bversion) >= 0);
652652

653653
i[1].journal_seq = i[0].journal_seq;
654654

0 commit comments

Comments
 (0)