]> git.karo-electronics.de Git - karo-tx-linux.git/commit
Btrfs: delay block group item insertion
authorJosef Bacik <jbacik@fusionio.com>
Tue, 11 Sep 2012 20:57:25 +0000 (16:57 -0400)
committerChris Mason <chris.mason@fusionio.com>
Mon, 1 Oct 2012 19:19:21 +0000 (15:19 -0400)
commitea658badc47e614e38ab4d98510488474c7e6d4b
treebab3ed9faaab577332de89c5d967a8e17b2e4c30
parentbe3940c0a90265654d778394cafe2e2cec674df8
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>
fs/btrfs/ctree.h
fs/btrfs/extent-tree.c
fs/btrfs/transaction.c
fs/btrfs/transaction.h