bcachefs: Fix should_invalidate_buckets()
authorKent Overstreet <kent.overstreet@gmail.com>
Mon, 18 Jul 2022 02:59:01 +0000 (22:59 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:36 +0000 (17:09 -0400)
commitb962552eabd59f0026dcc21c14775b9d78336baf
tree47718967fc85a907e22bebc7d29867079e9bff62
parent175379db206a3a36a80585b00bb974a6ab6c43c0
bcachefs: Fix should_invalidate_buckets()

Like bch2_copygc_wait_amount, should_invalidate_buckets() needs to try
to ensure that there are always more buckets free than the largest
reserve.

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