• Kent Overstreet's avatar
    bcachefs: Ensure that new inodes hit underlying btree · e3637266
    Kent Overstreet authored
    Inode creation is done with non-cached btree iterators, but then in the
    same transaction the inode may be updated again with a cached iterator -
    it makes cache coherency easier if new inodes always land in the
    underlying btree.
    
    This patch adds a check to bch2_trans_update() - if the same key is
    updated multiple times in the same transaction with both cached and non
    cache iterators, use the non cached iterator.
    Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
    e3637266
btree_update_leaf.c 30.3 KB