]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Btrfs: seperate out btrfs_block_rsv_check out into 2 different functions
authorJosef Bacik <josef@redhat.com>
Tue, 18 Oct 2011 16:15:48 +0000 (12:15 -0400)
committerChris Mason <chris.mason@oracle.com>
Wed, 16 Nov 2011 02:20:35 +0000 (21:20 -0500)
commitad6c9de012c1ec32cd82a1987a028f51b6c83137
tree1222b9a754a1ebc303fa8ad9e6b6b37d5d9e4abd
parente6fa714742f231a8c9306e7af2299ced99367e8b
Btrfs: seperate out btrfs_block_rsv_check out into 2 different functions

Currently btrfs_block_rsv_check does 2 things, it will either refill a block
reserve like in the truncate or refill case, or it will check to see if there is
enough space in the global reserve and possibly refill it.  However because of
overcommit we could be well overcommitting ourselves just to try and refill the
global reserve, when really we should just be committing the transaction.  So
breack this out into btrfs_block_rsv_refill and btrfs_block_rsv_check.  Refill
will try to reserve more metadata if it can and btrfs_block_rsv_check will not,
it will only tell you if the factor of the total space is still reserved.
Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
(cherry picked from commit 36ba022ac0b748dd543f43430b03198e899426c9)
fs/btrfs/ctree.h
fs/btrfs/extent-tree.c
fs/btrfs/free-space-cache.c
fs/btrfs/inode.c
fs/btrfs/relocation.c
fs/btrfs/transaction.c