]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Btrfs: release trans metadata bytes before flushing delayed refs
authorJosef Bacik <josef@redhat.com>
Fri, 14 Oct 2011 18:40:17 +0000 (14:40 -0400)
committerChris Mason <chris.mason@oracle.com>
Wed, 16 Nov 2011 02:20:33 +0000 (21:20 -0500)
commitc910e60a50bcfd3a6899027325c3a93cc7227be3
tree4766edcf8b9962a5ca3c595e893c1601d3ccbfdd
parent67218451488d6e92c6c541f3a04b6dea9b59dc09
Btrfs: release trans metadata bytes before flushing delayed refs

We started setting trans->block_rsv = NULL to allow the delayed refs flushing
stuff to use the right block_rsv and then just made
btrfs_trans_release_metadata() unconditionally use the trans block rsv.  The
problem with this is we need to reserve some space in the transaction and then
migrate it to the global block rsv, so we need to be able to free that out
properly.  So instead just move btrfs_trans_release_metadata() before the
delayed ref flushing and use trans->block_rsv for the freeing.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
(cherry picked from commit b24e03db0df3e9164c9649db12fecc8c2d81b0d1)
fs/btrfs/extent-tree.c
fs/btrfs/transaction.c