1. 21 Mar, 2011 3 commits
    • Josef Bacik's avatar
      Btrfs: don't be as aggressive about using bitmaps · 32cb0840
      Josef Bacik authored
      We have been creating bitmaps for small extents unconditionally forever.  This
      was great when testing to make sure the bitmap stuff was working, but is
      overkill normally.  So instead of always adding small chunks of free space to
      bitmaps, only start doing it if we go past half of our extent threshold.  This
      will keeps us from creating a bitmap for just one small free extent at the front
      of the block group, and will make the allocator a little faster as a result.
      Thanks,
      Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
      32cb0840
    • Josef Bacik's avatar
      Btrfs: deal with min_bytes appropriately when looking for a cluster · d0a365e8
      Josef Bacik authored
      We do all this fun stuff with min_bytes, but either don't use it in the case of
      just normal extents, or use it completely wrong in the case of bitmaps.  So fix
      this for both cases
      
      1) In the extent case, stop looking for space with window_free >= min_bytes
      instead of bytes + empty_size.
      
      2) In the bitmap case, we were looking for streches of free space that was at
      least min_bytes in size, which was not right at all.  So instead search for
      stretches of free space that are at least bytes in size (this will make a
      difference when we have > page size blocks) and then only search for min_bytes
      amount of free space.
      
      Thanks,
      Reviewed-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
      Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
      d0a365e8
    • Josef Bacik's avatar
      Btrfs: check free space in block group before searching for a cluster · 7d0d2e8e
      Josef Bacik authored
      The free space cluster stuff is heavy duty, so there is no sense in going
      through the entire song and dance if there isn't enough space in the block group
      to begin with.  Thanks,
      Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
      7d0d2e8e
  2. 17 Mar, 2011 16 commits
  3. 15 Mar, 2011 1 commit
  4. 14 Mar, 2011 20 commits