summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/btree_update_interior.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2018-10-06 10:12:42 +0200
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 23:08:10 +0200
commitef337c54c6d18d4c6ce0aef8f4f327d4cf42ae08 (patch)
treed27014f83c04d4b29a57b721b3451deea8b546ca /fs/bcachefs/btree_update_interior.h
parentbcachefs: Split out alloc_background.c (diff)
downloadlinux-ef337c54c6d18d4c6ce0aef8f4f327d4cf42ae08.tar.xz
linux-ef337c54c6d18d4c6ce0aef8f4f327d4cf42ae08.zip
bcachefs: Allocation code refactoring
bch2_alloc_sectors_start() was a nightmare to work with - it's got some tricky stuff to do, since it wants to use the buckets the writepoint already has, unless they're not in the target it wants to write to, unless it can't allocate from any other devices in which case it will use those buckets if it has to - et cetera. This restructures the code to start with a new empty list of open buckets we're going to use for the new allocation, pulling buckets from the write point's list as we decide that we really are going to use them - making the code somewhat more functional and drastically easier to understand. Also fixes a bug where we could end up waiting on c->freelist_wait (because allocating from one device failed) but return success from bch2_bucket_alloc(), because allocating from a different device succeeded. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_update_interior.h')
-rw-r--r--fs/bcachefs/btree_update_interior.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/bcachefs/btree_update_interior.h b/fs/bcachefs/btree_update_interior.h
index b24988352b03..e5156e908110 100644
--- a/fs/bcachefs/btree_update_interior.h
+++ b/fs/bcachefs/btree_update_interior.h
@@ -132,7 +132,6 @@ struct btree_update {
void bch2_btree_node_free_inmem(struct bch_fs *, struct btree *,
struct btree_iter *);
void bch2_btree_node_free_never_inserted(struct bch_fs *, struct btree *);
-void bch2_btree_open_bucket_put(struct bch_fs *, struct btree *);
struct btree *__bch2_btree_node_alloc_replacement(struct btree_update *,
struct btree *,