diff options
author | Josef Bacik <josef@redhat.com> | 2011-10-18 18:15:48 +0200 |
---|---|---|
committer | Josef Bacik <josef@redhat.com> | 2011-10-19 21:12:59 +0200 |
commit | 36ba022ac0b748dd543f43430b03198e899426c9 (patch) | |
tree | 3175872760ac769cde046b3ac43900fc42856bb8 /fs/btrfs/free-space-cache.c | |
parent | Btrfs: reserve some space for an orphan item when unlinking (diff) | |
download | linux-36ba022ac0b748dd543f43430b03198e899426c9.tar.xz linux-36ba022ac0b748dd543f43430b03198e899426c9.zip |
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>
Diffstat (limited to 'fs/btrfs/free-space-cache.c')
-rw-r--r-- | fs/btrfs/free-space-cache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index 5d40c1ed8225..2fecfc3183ee 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c @@ -203,7 +203,7 @@ int btrfs_truncate_free_space_cache(struct btrfs_root *root, rsv = trans->block_rsv; trans->block_rsv = root->orphan_block_rsv; - ret = btrfs_block_rsv_check(root, root->orphan_block_rsv, 0, 5, 0); + ret = btrfs_block_rsv_check(root, root->orphan_block_rsv, 5); if (ret) return ret; |