summaryrefslogtreecommitdiff
path: root/fs/bcachefs/bcachefs_format.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2022-12-05 16:49:13 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-08-14 12:28:23 -0400
commitb51204ce30d327b40ad9b23872490fc9f52fabab (patch)
tree8c3b68781db82b3df44e790e1c7111ba7eae1087 /fs/bcachefs/bcachefs_format.h
parent1549cb0541734ccadc1a3d3097b63367c753f5aa (diff)
bcachefs: Rework lru btree
This patch changes how the LRU index works: Instead of using KEY_TYPE_lru where the bucket the lru entry points to is part of the value, this switches to KEY_TYPE_set and encoding the bucket we refer to in the low bits of the key. This means that we no longer have to check for collisions when inserting LRU entries. We'll be making using of this in the next patch, which adds a btree write buffer - a pure write buffer for btree updates, where updates are appended to a simple array and then periodically sorted and batch inserted. This is a new on disk format version, and a forced upgrade. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/bcachefs_format.h')
-rw-r--r--fs/bcachefs/bcachefs_format.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/bcachefs_format.h b/fs/bcachefs/bcachefs_format.h
index 7e67d2e94a29..99f9fbd1401f 100644
--- a/fs/bcachefs/bcachefs_format.h
+++ b/fs/bcachefs/bcachefs_format.h
@@ -1562,7 +1562,8 @@ struct bch_sb_field_journal_seq_blacklist {
x(backpointers, 22) \
x(inode_v3, 23) \
x(unwritten_extents, 24) \
- x(bucket_gens, 25)
+ x(bucket_gens, 25) \
+ x(lru_v2, 26)
enum bcachefs_metadata_version {
bcachefs_metadata_version_min = 9,