• Filipe David Borba Manana's avatar
    Btrfs: make some tree searches in send.c more efficient · dff6d0ad
    Filipe David Borba Manana authored
    We have this pattern where we do search for a contiguous group of
    items in a tree and everytime we find an item, we process it, then
    we release our path, increment the offset of the search key, do
    another full tree search and repeat these steps until a tree search
    can't find more items we're interested in.
    
    Instead of doing these full tree searches after processing each item,
    just process the next item/slot in our leaf and don't release the path.
    Since all these trees are read only and we always use the commit root
    for a search and skip node/leaf locks, we're not affecting concurrency
    on the trees.
    Signed-off-by: default avatarFilipe David Borba Manana <fdmanana@gmail.com>
    Signed-off-by: default avatarJosef Bacik <jbacik@fb.com>
    dff6d0ad
send.c 126 KB