bcachefs: Change "accounting overran journal reservation" to a warning
authorKent Overstreet <kent.overstreet@linux.dev>
Thu, 14 Mar 2024 17:26:26 +0000 (13:26 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Mon, 18 Mar 2024 00:53:11 +0000 (20:53 -0400)
This doesn't need to be a BUG_ON(); the actual serious "things break"
condition is if the whole journal write overruns the available space,
and that has a fatal error, not a BUG_ON(). This check indicates we
screwed something up, but it should be a warning.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/journal_io.c

index d76c3c0c203f9eb8e39d391b28bf09430f919f6b..a3b66a3c76dd5b9fd01f2aea599335b2daa75967 100644 (file)
@@ -1848,7 +1848,8 @@ static int bch2_journal_write_prep(struct journal *j, struct journal_buf *w)
 
        bch2_journal_super_entries_add_common(c, &end, seq);
        u64s    = (u64 *) end - (u64 *) start;
-       BUG_ON(u64s > j->entry_u64s_reserved);
+
+       WARN_ON(u64s > j->entry_u64s_reserved);
 
        le32_add_cpu(&jset->u64s, u64s);