aboutsummaryrefslogtreecommitdiff
path: root/fs/bcachefs/journal_reclaim.c
diff options
context:
space:
mode:
authorGravatar Kent Overstreet <kent.overstreet@linux.dev> 2023-11-07 18:08:38 -0500
committerGravatar Kent Overstreet <kent.overstreet@linux.dev> 2024-01-01 11:47:41 -0500
commit0ba9375a111a88e47733b679f6affb7f6492de4c (patch)
tree47db49684bfdac7c534aa5dcad130a331ed4ac57 /fs/bcachefs/journal_reclaim.c
parentbcachefs: bch2_trans_node_add no longer uses trans_for_each_path() (diff)
downloadlinux-0ba9375a111a88e47733b679f6affb7f6492de4c.tar.gz
linux-0ba9375a111a88e47733b679f6affb7f6492de4c.tar.bz2
linux-0ba9375a111a88e47733b679f6affb7f6492de4c.zip
bcachefs: Unwritten journal buffers are always dirty
Ensure that journal bufs that haven't been written can't be reclaimed from the journal pin fifo, and can thus have new pins taken. Prep work for changing the btree write buffer to pull keys from the journal directly. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/journal_reclaim.c')
-rw-r--r--fs/bcachefs/journal_reclaim.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/bcachefs/journal_reclaim.c b/fs/bcachefs/journal_reclaim.c
index bd33a7c9634c..dc415e0ec493 100644
--- a/fs/bcachefs/journal_reclaim.c
+++ b/fs/bcachefs/journal_reclaim.c
@@ -303,6 +303,7 @@ void bch2_journal_reclaim_fast(struct journal *j)
* all btree nodes got written out
*/
while (!fifo_empty(&j->pin) &&
+ j->pin.front <= j->seq_ondisk &&
!atomic_read(&fifo_peek_front(&j->pin).count)) {
j->pin.front++;
popped = true;