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

bcachefs: Dump journal state when the journal deadlocks

Currently tracking down one of these bugs.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent dbd1e825
......@@ -414,8 +414,17 @@ static int __journal_res_get(struct journal *j, struct journal_res *res,
goto retry;
if (ret == -ENOSPC) {
WARN_ONCE(!can_discard && (flags & JOURNAL_RES_GET_RESERVED),
"JOURNAL_RES_GET_RESERVED set but journal full");
if (WARN_ONCE(!can_discard && (flags & JOURNAL_RES_GET_RESERVED),
"JOURNAL_RES_GET_RESERVED set but journal full")) {
char *buf;
buf = kmalloc(4096, GFP_NOFS);
if (buf) {
bch2_journal_debug_to_text(&_PBUF(buf, 4096), j);
pr_err("\n%s", buf);
kfree(buf);
}
}
/*
* Journal is full - can't rely on reclaim from work item due to
......
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