bcachefs: Fix allocator + journal interaction
authorKent Overstreet <kent.overstreet@gmail.com>
Mon, 27 Dec 2021 02:41:09 +0000 (21:41 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:20 +0000 (17:09 -0400)
commit36f035e90804d30dba4336daafe1b89c9a8ffe98
tree935bdb4ec5bb7f9df82c0d9d2828c411b020a71a
parenta786087744fcff140ecce0e1dd93a43186edf8ad
bcachefs: Fix allocator + journal interaction

The allocator needs to wait until the last update touching a bucket has
been commited before writing to it again. However, the code was checking
against the last dirty journal sequence number, not the last flushed
journal sequence number.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
fs/bcachefs/alloc_background.c
fs/bcachefs/buckets.c