linux/fs/btrfs/tests
Josef Bacik 47ab2a6c68 Btrfs: remove empty block groups automatically
One problem that has plagued us is that a user will use up all of his space with
data, remove a bunch of that data, and then try to create a bunch of small files
and run out of space.  This happens because all the chunks were allocated for
data since the metadata requirements were so low.  But now there's a bunch of
empty data block groups and not enough metadata space to do anything.  This
patch solves this problem by automatically deleting empty block groups.  If we
notice the used count go down to 0 when deleting or on mount notice that a block
group has a used count of 0 then we will queue it to be deleted.

When the cleaner thread runs we will double check to make sure the block group
is still empty and then we will delete it.  This patch has the side effect of no
longer having a bunch of BUG_ON()'s in the chunk delete code, which will be
helpful for both this and relocate.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Chris Mason <clm@fb.com>
2014-09-22 17:13:21 -07:00
..
btrfs-tests.c btrfs: prevent RCU warning when dereferencing radix tree slot 2014-06-13 09:52:22 -07:00
btrfs-tests.h Btrfs: add sanity tests for new qgroup accounting code 2014-06-09 17:20:49 -07:00
extent-buffer-tests.c
extent-io-tests.c Btrfs: add tests for find_lock_delalloc_range 2013-11-11 21:56:51 -05:00
free-space-tests.c Btrfs: remove empty block groups automatically 2014-09-22 17:13:21 -07:00
inode-tests.c Btrfs: add sanity tests for new qgroup accounting code 2014-06-09 17:20:49 -07:00
qgroup-tests.c Btrfs: fix qgroups sanity test crash or hang 2014-06-13 09:52:24 -07:00