diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2020-11-18 13:21:59 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:47 -0400 |
commit | ed0e24c0992dffe494bdd0ea6ddf3b816c438524 (patch) | |
tree | bde3bdccc42561e514ba3d29947e3400556e764d /fs/bcachefs/journal_types.h | |
parent | d8ebed7d24cdf3d4596ab5af471f5e7f749d7aab (diff) | |
download | linux-stable-ed0e24c0992dffe494bdd0ea6ddf3b816c438524.tar.gz linux-stable-ed0e24c0992dffe494bdd0ea6ddf3b816c438524.tar.bz2 linux-stable-ed0e24c0992dffe494bdd0ea6ddf3b816c438524.zip |
bcachefs: Be more precise with journal error reporting
We were incorrectly detecting a journal deadlock - the journal filling
up - when only the journal pin fifo had filled up; if the journal pin
fifo is full that just means we need to wait on reclaim.
This plumbs through better error reporting so we can better discriminate
in the journal_res_get path what's going on.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/journal_types.h')
-rw-r--r-- | fs/bcachefs/journal_types.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/bcachefs/journal_types.h b/fs/bcachefs/journal_types.h index 22ff7f8081c6..5f20653b8eb5 100644 --- a/fs/bcachefs/journal_types.h +++ b/fs/bcachefs/journal_types.h @@ -146,7 +146,13 @@ struct journal { * 0, or -ENOSPC if waiting on journal reclaim, or -EROFS if * insufficient devices: */ - int cur_entry_error; + enum { + cur_entry_ok, + cur_entry_blocked, + cur_entry_journal_full, + cur_entry_journal_pin_full, + cur_entry_insufficient_devices, + } cur_entry_error; union journal_preres_state prereserved; |