summaryrefslogtreecommitdiff
path: root/fs/bcachefs/journal_io.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2019-03-03 16:50:40 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:17 -0400
commit03d5eaed8624fdc7918478bffd05d67e773ac7d0 (patch)
treee068c3ddb51b84a40bf0055472eef920e24e2dda /fs/bcachefs/journal_io.c
parent2384db8f32a2df9e71cd3003d213b48f64cbde1e (diff)
downloadlwn-03d5eaed8624fdc7918478bffd05d67e773ac7d0.tar.gz
lwn-03d5eaed8624fdc7918478bffd05d67e773ac7d0.zip
bcachefs: bch2_journal_space_available improvements
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/journal_io.c')
-rw-r--r--fs/bcachefs/journal_io.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/journal_io.c b/fs/bcachefs/journal_io.c
index b6a51dff0978..07cfbb975c37 100644
--- a/fs/bcachefs/journal_io.c
+++ b/fs/bcachefs/journal_io.c
@@ -970,7 +970,8 @@ static int journal_write_alloc(struct journal *j, struct journal_buf *w,
if (sectors > ja->sectors_free &&
sectors <= ca->mi.bucket_size &&
- bch2_journal_dev_buckets_available(j, ja)) {
+ bch2_journal_dev_buckets_available(j, ja,
+ journal_space_discarded)) {
ja->cur_idx = (ja->cur_idx + 1) % ja->nr;
ja->sectors_free = ca->mi.bucket_size;
}