mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 01:49:36 +00:00
bcachefs: Dump journal state when the journal deadlocks
Currently tracking down one of these bugs. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
dbd1e8259a
commit
e8bd002b23
1 changed files with 11 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue