diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-01-09 20:48:31 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:29 -0400 |
commit | f25d8215f499418c17dfde0b3158a66e03c758dc (patch) | |
tree | 2239ac974b58f41e6687a840c21cf2156795fded /fs/bcachefs/recovery.c | |
parent | c6b2826cd14c5421bc50a768e923d078a71139c1 (diff) | |
download | lwn-f25d8215f499418c17dfde0b3158a66e03c758dc.tar.gz lwn-f25d8215f499418c17dfde0b3158a66e03c758dc.zip |
bcachefs: Kill allocator threads & freelists
Now that we have new persistent data structures for the allocator, this
patch converts the allocator to use them.
Now, foreground bucket allocation uses the freespace btree to find
buckets to allocate, instead of popping buckets off the freelist.
The background allocator threads are no longer needed and are deleted,
as well as the allocator freelists. Now we only need background tasks
for invalidating buckets containing cached data (when we are low on
empty buckets), and for issuing discards.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/recovery.c')
-rw-r--r-- | fs/bcachefs/recovery.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c index 690a36ea1383..50e5c5e852f7 100644 --- a/fs/bcachefs/recovery.c +++ b/fs/bcachefs/recovery.c @@ -1374,6 +1374,7 @@ int bch2_fs_initialize(struct bch_fs *c) * Write out the superblock and journal buckets, now that we can do * btree updates */ + bch_verbose(c, "marking superblocks"); err = "error marking superblock and journal"; for_each_member_device(ca, c, i) { ret = bch2_trans_mark_dev_sb(c, ca); @@ -1385,6 +1386,7 @@ int bch2_fs_initialize(struct bch_fs *c) ca->new_fs_bucket_idx = 0; } + bch_verbose(c, "initializing freespace"); err = "error initializing freespace"; ret = bch2_fs_freespace_init(c); if (ret) |