]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: clear all space_info->full after removing a block group
authorChris Mason <chris.mason@oracle.com>
Fri, 24 Jul 2009 20:30:55 +0000 (16:30 -0400)
committerChris Mason <chris.mason@oracle.com>
Fri, 24 Jul 2009 20:30:55 +0000 (16:30 -0400)
commitfc58901a1075229f99e4752c41eb4f8068c74bf5
tree4207fcd1e595cfb4074b719fd22e70277e72464f
parente1c446ad2f52ffc49e645d4cba7588c99769ed2e
Btrfs: clear all space_info->full after removing a block group

Btrfs allocates individual extents from block groups, and each
block group has a specific type.  It may hold metadata, data
mirrored or striped etc.

When we balance space (btrfs-vol -b) or remove a drive (btrfs-vol -r)
we free block groups.  Once a block group is freed, the space it was
using on the device may be available for use by new block groups.

btrfs_remove_block_group was clearing the flag that said
'our devices are full, don't even try to allocate new block groups',
but it was only clearing that flag for a specific type of block group.

This commit clears the full flag for all of the types of block groups,
making it much more likely that we'll be able to balance space when
the drive is close to full.

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