• Kent Overstreet's avatar
    bcachefs: Btree key cache coherency · 12ce5b7d
    Kent Overstreet authored
     - Updates to non key cache iterators will now be transparently
       redirected to the key cache for cached btrees.
    
     - Except when creating new keys: then the update goes to underlying
       btree
    
    For for iterating over a cached btree to work, we need to ensure that if
    a key exists in the key cache, it also exists in the btree - otherwise
    the iterator code will skip past it and not check the key cache.
    
    Otherwise, for consistency, all updates should go to the same place -
    the key cache.
    Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
    12ce5b7d
btree_key_cache.c 17.9 KB