summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/transaction.c
diff options
context:
space:
mode:
authorJosef Bacik2011-08-19 16:31:56 +0200
committerJosef Bacik2011-10-19 21:12:38 +0200
commit482e6dc5261406fdb921946e70b51467b0305bad (patch)
treeb3acb0574ea5b7a8bd4991c346f5166f0317bbf4 /fs/btrfs/transaction.c
parentBtrfs: reduce the amount of space needed for truncates (diff)
downloadkernel-qcow2-linux-482e6dc5261406fdb921946e70b51467b0305bad.tar.gz
kernel-qcow2-linux-482e6dc5261406fdb921946e70b51467b0305bad.tar.xz
kernel-qcow2-linux-482e6dc5261406fdb921946e70b51467b0305bad.zip
Btrfs: allow callers to specify if flushing can occur for btrfs_block_rsv_check
If you run xfstest 224 it you will get lots of messages about not being able to delete inodes and that they will be cleaned up next mount. This is because btrfs_block_rsv_check was not calling reserve_metadata_bytes with the ability to flush, so if there was not enough space, it simply failed. But in truncate and evict case we could easily flush space to try and get enough space to do our work, so make btrfs_block_rsv_check take a flush argument to pass down to reserve_metadata_bytes. Now xfstests 224 runs fine without all those complaints. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com>
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r--fs/btrfs/transaction.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index 3e20cc8c1c06..a1d8c322c1ba 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -419,7 +419,7 @@ static int should_end_transaction(struct btrfs_trans_handle *trans,
{
int ret;
ret = btrfs_block_rsv_check(trans, root,
- &root->fs_info->global_block_rsv, 0, 5);
+ &root->fs_info->global_block_rsv, 0, 5, 0);
return ret ? 1 : 0;
}