diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-12-11 23:13:09 +0100 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 23:09:29 +0200 |
commit | c6b2826cd14c5421bc50a768e923d078a71139c1 (patch) | |
tree | 7a914ef8a811c4330a42ee397c852ff1c7d6a04d /fs/bcachefs/super-io.h | |
parent | bcachefs: KEY_TYPE_alloc_v4 (diff) | |
download | linux-c6b2826cd14c5421bc50a768e923d078a71139c1.tar.xz linux-c6b2826cd14c5421bc50a768e923d078a71139c1.zip |
bcachefs: Freespace, need_discard btrees
This adds two new btrees for the upcoming allocator rewrite: an extents
btree of free buckets, and a btree for buckets awaiting discards.
We also add a new trigger for alloc keys to keep the new btrees up to
date, and a compatibility path to initialize them on existing
filesystems.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/super-io.h')
-rw-r--r-- | fs/bcachefs/super-io.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/bcachefs/super-io.h b/fs/bcachefs/super-io.h index bed61a01e4be..ab0ad3248e8f 100644 --- a/fs/bcachefs/super-io.h +++ b/fs/bcachefs/super-io.h @@ -103,6 +103,7 @@ static inline struct bch_member_cpu bch2_mi_to_cpu(struct bch_member *mi) .durability = BCH_MEMBER_DURABILITY(mi) ? BCH_MEMBER_DURABILITY(mi) - 1 : 1, + .freespace_initialized = BCH_MEMBER_FREESPACE_INITIALIZED(mi), .valid = bch2_member_exists(mi), }; } |