bcachefs: Fix for journal getting stuck
authorKent Overstreet <kent.overstreet@gmail.com>
Wed, 23 Feb 2022 15:26:10 +0000 (10:26 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:25 +0000 (17:09 -0400)
commite201f70b116513cb0d17ba32e1f00c234dee9d7e
tree66399e457e5eecd5d6f23206df5f8cb46f09ca8d
parent6e44568cc311b39613ed292c9dc1dd8cbec86db7
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>
fs/bcachefs/journal.c
fs/bcachefs/journal.h