1. 21 3月, 2011 3 次提交
    • J
      Btrfs: don't be as aggressive about using bitmaps · 32cb0840
      Josef Bacik 提交于
      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: NJosef Bacik <josef@redhat.com>
      32cb0840
    • J
      Btrfs: deal with min_bytes appropriately when looking for a cluster · d0a365e8
      Josef Bacik 提交于
      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: NLi Zefan <lizf@cn.fujitsu.com>
      Signed-off-by: NJosef Bacik <josef@redhat.com>
      d0a365e8
    • J
      Btrfs: check free space in block group before searching for a cluster · 7d0d2e8e
      Josef Bacik 提交于
      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: NJosef Bacik <josef@redhat.com>
      7d0d2e8e
  2. 18 3月, 2011 16 次提交
  3. 15 3月, 2011 21 次提交