Commit 531b69e9 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Convert journal BUG_ON() to a warning

It's definitely indicative of a bug if we request to flush a journal
sequence number that hasn't happened yet, but it's more useful if we
warn and print out the relevant sequence numbers instead of just dying.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
parent 61d876c2
......@@ -550,7 +550,10 @@ int bch2_journal_flush_seq_async(struct journal *j, u64 seq,
spin_lock(&j->lock);
BUG_ON(seq > journal_cur_seq(j));
if (WARN_ONCE(seq > journal_cur_seq(j),
"requested to flush journal seq %llu, but currently at %llu",
seq, journal_cur_seq(j)))
goto out;
/* Recheck under lock: */
if (j->err_seq && seq >= j->err_seq) {
......
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