• Kent Overstreet's avatar
    bcachefs: bch2_btree_iter_peek_upto() · 85d8cf16
    Kent Overstreet authored
    In BTREE_ITER_FILTER_SNAPHOTS mode, we skip over keys in unrelated
    snapshots. When we hit the end of an inode, if the next inode(s) are in
    a different subvolume, we could potentially have to skip past many keys
    before finding a key we can return to the caller, so they can terminate
    the iteration.
    
    This adds a peek_upto() variant to solve this problem, to be used when
    we know the range we're searching within.
    Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
    85d8cf16
dirent.c 13.3 KB