diff options
author | Josef Bacik <jbacik@fusionio.com> | 2012-09-11 22:57:25 +0200 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2012-10-01 21:19:21 +0200 |
commit | ea658badc47e614e38ab4d98510488474c7e6d4b (patch) | |
tree | bab3ed9faaab577332de89c5d967a8e17b2e4c30 /fs/btrfs/transaction.h | |
parent | btrfs: Kill some bi_idx references (diff) | |
download | linux-ea658badc47e614e38ab4d98510488474c7e6d4b.tar.xz linux-ea658badc47e614e38ab4d98510488474c7e6d4b.zip |
Btrfs: delay block group item insertion
So we have lots of places where we try to preallocate chunks in order to
make sure we have enough space as we make our allocations. This has
historically meant that we're constantly tweaking when we should allocate a
new chunk, and historically we have gotten this horribly wrong so we way
over allocate either metadata or data. To try and keep this from happening
we are going to make it so that the block group item insertion is done out
of band at the end of a transaction. This will allow us to create chunks
even if we are trying to make an allocation for the extent tree. With this
patch my enospc tests run faster (didn't expect this) and more efficiently
use the disk space (this is what I wanted). Thanks,
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'fs/btrfs/transaction.h')
-rw-r--r-- | fs/btrfs/transaction.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/transaction.h b/fs/btrfs/transaction.h index 1b054800eca3..b6463e128048 100644 --- a/fs/btrfs/transaction.h +++ b/fs/btrfs/transaction.h @@ -68,6 +68,7 @@ struct btrfs_trans_handle { struct btrfs_root *root; struct seq_list delayed_ref_elem; struct list_head qgroup_ref_list; + struct list_head new_bgs; }; struct btrfs_pending_snapshot { |