]> git.ipfire.org Git - thirdparty/linux.git/commit
bcachefs: Fix write buffer flushing from open journal entry
authorKent Overstreet <kent.overstreet@linux.dev>
Tue, 22 Jul 2025 03:41:50 +0000 (23:41 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Fri, 25 Jul 2025 02:56:37 +0000 (22:56 -0400)
commit1831840c2bc502c98c21df2ea0fa419b2ed0a6ec
treedc6e90d3bd2238ddf632b7775f05b886cdc3075f
parenteef91707009ad8d98e0d397d58df47caa6ff2330
bcachefs: Fix write buffer flushing from open journal entry

When flushing the btree write buffer, we pull write buffer keys directly
from the journal instead of letting the journal write path copy them to
the write buffer.

When flushing from the currently open journal buffer, we have to block
new reservations and wait for outstanding reservations to complete.

Recheck the reservation state after blocking new reservations:
previously, we were checking the reservation count from before calling
__journal_block().

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