]> git.karo-electronics.de Git - mv-sheeva.git/commit
Btrfs: fix early enospc during balancing
authorChris Mason <chris.mason@oracle.com>
Tue, 22 Sep 2009 18:48:44 +0000 (14:48 -0400)
committerChris Mason <chris.mason@oracle.com>
Tue, 22 Sep 2009 18:48:44 +0000 (14:48 -0400)
commit7ce618db9878689f87897b673fa3329070860fc7
treea149e88a2f28c2fd5ad515f7351af9832540fedb
parent33b4d47f5e24b986f486d7de9a2df915ad1fdfbc
Btrfs: fix early enospc during balancing

We now do extra checks before a balance to make sure
there is room for the balance to take place.  One of
the checks was testing to see if we were trying to
balance away the last block group of a given type.

If there is no space available for new chunks, we
should not try and balance away the last block group
of a give type.  But, the code wasn't checking for
available chunk space, and so it was exiting too soon.

The fix here is to combine some of the checks and make
sure we try to allocate new chunks when we're balancing
the last block group.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/extent-tree.c