diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-02-23 18:26:10 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:09:25 +0300 |
commit | e201f70b116513cb0d17ba32e1f00c234dee9d7e (patch) | |
tree | 66399e457e5eecd5d6f23206df5f8cb46f09ca8d /fs/bcachefs/journal.h | |
parent | 6e44568cc311b39613ed292c9dc1dd8cbec86db7 (diff) | |
download | linux-e201f70b116513cb0d17ba32e1f00c234dee9d7e.tar.xz |
bcachefs: Fix for journal getting stuck
The journal can get stuck if we need to get a journal reservation for
something we have a pre-reservation for, but aren't able to reclaim
space, or if the pin fifo is full - it's impractical to resize the pin
fifo at runtime.
Previously, we reserved 8 entries in the pin fifo for pre-reservations,
but that seems small - we're seeing the journal occasionally get stuck.
Let's reserve a quarter of it.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/journal.h')
-rw-r--r-- | fs/bcachefs/journal.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/journal.h b/fs/bcachefs/journal.h index 17f9037b404a..9d4c6d86d5c1 100644 --- a/fs/bcachefs/journal.h +++ b/fs/bcachefs/journal.h @@ -372,7 +372,7 @@ static inline bool journal_check_may_get_unreserved(struct journal *j) { union journal_preres_state s = READ_ONCE(j->prereserved); bool ret = s.reserved < s.remaining && - fifo_free(&j->pin) > 8; + fifo_free(&j->pin) > j->pin.size / 4; lockdep_assert_held(&j->lock); |