• Josef Bacik's avatar
    Btrfs: cache bitmaps when searching for a cluster · 86d4a77b
    Josef Bacik authored
    If we are looking for a cluster in a particularly sparse or fragmented block
    group, we will do a lot of looping through the free space tree looking for
    various things, and if we need to look at bitmaps we will endup doing the whole
    dance twice.  So instead add the bitmap entries to a temporary list so if we
    have to do the bitmap search we can just look through the list of entries we've
    found quickly instead of having to loop through the entire tree again.  Thanks,
    Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
    86d4a77b
free-space-cache.c 64.8 KB