]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: don't try to allocate from a block group that doesn't have enough space
authorJosef Bacik <josef@redhat.com>
Fri, 13 May 2011 15:07:12 +0000 (11:07 -0400)
committerJosef Bacik <josef@redhat.com>
Mon, 23 May 2011 17:03:15 +0000 (13:03 -0400)
commit0b0be879d654a521f650a024d72fd52bc5540e7f
tree8c445c012b9b0184eed9b7f52b35c0d0b85b0e0b
parenta8ef73eafa17814cfec10be4290eb1d11e093332
Btrfs: don't try to allocate from a block group that doesn't have enough space

If we have a very large filesystem, we can spend a lot of time in
find_free_extent just trying to allocate from empty block groups.  So instead
check to see if the block group even has enough space for the allocation, and if
not go on to the next block group.

Signed-off-by: Josef Bacik <josef@redhat.com>
fs/btrfs/extent-tree.c