summaryrefslogtreecommitdiff
path: root/fs/bcachefs/alloc_types.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-01-07 17:18:14 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:50 -0400
commit890e3f5bf7e8d6035179c5f4668e0d30c19e9541 (patch)
tree06ea64b20d411ecd179a48f376d33dd043dd5ee6 /fs/bcachefs/alloc_types.h
parentfd54c40e00dc54cf1cd1724e4184502a56b9848f (diff)
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>
Diffstat (limited to 'fs/bcachefs/alloc_types.h')
-rw-r--r--fs/bcachefs/alloc_types.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/alloc_types.h b/fs/bcachefs/alloc_types.h
index 0cfb026a02e5..1abfff5290bc 100644
--- a/fs/bcachefs/alloc_types.h
+++ b/fs/bcachefs/alloc_types.h
@@ -34,9 +34,9 @@ struct bucket_clock {
struct mutex lock;
};
-/* There is one reserve for each type of btree, one for prios and gens
- * and one for moving GC */
enum alloc_reserve {
+ RESERVE_BTREE_MOVINGGC = -2,
+ RESERVE_BTREE = -1,
RESERVE_MOVINGGC = 0,
RESERVE_NONE = 1,
RESERVE_NR = 2,