mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 06:33:07 +00:00
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: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
parent
61d876c25d
commit
531b69e9af
1 changed files with 4 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue