bcachefs: Don't aggressively discard the journal
authorKent Overstreet <kent.overstreet@linux.dev>
Wed, 7 May 2025 17:32:15 +0000 (13:32 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Wed, 7 May 2025 21:10:10 +0000 (17:10 -0400)
commit8e4d28036c293241b312b1fceafb32b994f80fcc
tree6736216a95acfea3299f8d140cc25270e7e8e892
parentda18dabc3784663a088943e613c36cd17aeb52d3
bcachefs: Don't aggressively discard the journal

We frequently use 'bcachefs list_journal -a' for debugging, as it
provides a record of all btree transactions, and a history of what
happened.

But it's not so useful if we immediately discard journal buckets right
after they're no longer dirty.

This tweaks journal reclaim to only discard when we're low on space,
keeping the journal mostly un-discarded.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/journal_reclaim.c