]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bcachefs: Free journal bufs when not in use
authorKent Overstreet <kent.overstreet@linux.dev>
Thu, 6 Feb 2025 00:13:39 +0000 (19:13 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sat, 15 Mar 2025 01:02:13 +0000 (21:02 -0400)
commit35282ce9e82f6e4c044e6a74b6fef45dd4996718
tree36a85d725079d1df61f74f8880ae1c2806baafd3
parent2e853fdbc74411643b00a14ee75ca234675a9bf2
bcachefs: Free journal bufs when not in use

Since we're increasing the number of 'struct journal_bufs', we don't
want them all permanently holding onto buffers for the journal data -
that'd be 16 * 2MB = 32MB, or potentially more.

Add a single-element mempool (open coded, since buffer size varies),
this also means we won't be hitting the memory allocator every time we
open and close a journal entry/buffer.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/journal.c
fs/bcachefs/journal_io.c
fs/bcachefs/journal_types.h