]> www.infradead.org Git - users/hch/xfs.git/commit
bcachefs: Fix discard path journal flushing
authorKent Overstreet <kent.overstreet@linux.dev>
Mon, 27 Jan 2025 06:21:44 +0000 (01:21 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Fri, 7 Feb 2025 03:35:11 +0000 (22:35 -0500)
commit9e9033522ad1e4bb697c9493aa449630fa2c98d2
tree9956331176a7d0fa7eb5ca454c920bfa32b90428
parent2ef995df0ce592f665d312008dbe1ad1c4bcf87f
bcachefs: Fix discard path journal flushing

The discard path is supposed to issue journal flushes when there's too
many buckets empty buckets that need a journal commit before they can be
written to again, but at some point this code seems to have been lost.

Bring it back with a new optimization to make sure we don't issue too
many journal flushes: the journal now tracks the sequence number of the
most recent flush in progress, which the discard path uses when deciding
which buckets need a journal flush.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/alloc_background.c
fs/bcachefs/alloc_foreground.c
fs/bcachefs/alloc_types.h
fs/bcachefs/buckets_waiting_for_journal.c
fs/bcachefs/buckets_waiting_for_journal.h
fs/bcachefs/journal.c
fs/bcachefs/journal_types.h
fs/bcachefs/trace.h