bcachefs: Reserve some open buckets for btree allocations
authorKent Overstreet <kent.overstreet@gmail.com>
Thu, 7 Jan 2021 22:18:14 +0000 (17:18 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:50 +0000 (17:08 -0400)
commit890e3f5bf7e8d6035179c5f4668e0d30c19e9541
tree06ea64b20d411ecd179a48f376d33dd043dd5ee6
parentfd54c40e00dc54cf1cd1724e4184502a56b9848f
bcachefs: Reserve some open buckets for btree allocations

This reverts part of the change from "bcachefs: Don't use
BTREE_INSERT_USE_RESERVE so much" - it turns out we still should be
reserving open buckets for btree node allocations, because otherwise
data bucket allocations (especially with erasure coding enabled) can use
up all our open buckets and we won't be able to do the metadata update
that lets us release those open bucket references. Oops.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/alloc_foreground.c
fs/bcachefs/alloc_types.h
fs/bcachefs/btree_update_interior.c