]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
bcachefs: Btree key cache
authorKent Overstreet <kent.overstreet@gmail.com>
Fri, 8 Mar 2019 00:46:10 +0000 (19:46 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:41 +0000 (17:08 -0400)
commit2ca88e5ad9b29624ea1467ef7fcc583c928fd783
treec517d75d448c2a450896090c8bb0fcbeef78afd3
parent451570a5bc5f72c4c6442631d158f0c11cb3daa8
bcachefs: Btree key cache

This introduces a new kind of btree iterator, cached iterators, which
point to keys cached in a hash table. The cache also acts as a write
cache - in the update path, we journal the update but defer updating the
btree until the cached entry is flushed by journal reclaim.

Cache coherency is for now up to the users to handle, which isn't ideal
but should be good enough for now.

These new iterators will be used for updating inodes and alloc info (the
alloc and stripes btrees).

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
14 files changed:
fs/bcachefs/Makefile
fs/bcachefs/bcachefs.h
fs/bcachefs/btree_iter.c
fs/bcachefs/btree_iter.h
fs/bcachefs/btree_key_cache.c [new file with mode: 0644]
fs/bcachefs/btree_key_cache.h [new file with mode: 0644]
fs/bcachefs/btree_types.h
fs/bcachefs/btree_update.h
fs/bcachefs/btree_update_interior.c
fs/bcachefs/btree_update_leaf.c
fs/bcachefs/buckets.c
fs/bcachefs/journal_reclaim.c
fs/bcachefs/journal_reclaim.h
fs/bcachefs/super.c