• Kent Overstreet's avatar
    bcachefs: Btree key cache · 2ca88e5a
    Kent Overstreet authored
    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: default avatarKent Overstreet <kent.overstreet@gmail.com>
    Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
    2ca88e5a
btree_update.h 4.55 KB