Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 274618
b: refs/heads/master
c: 482e6dc
h: refs/heads/master
v: v3
  • Loading branch information
Josef Bacik committed Oct 19, 2011
1 parent 58f683b commit 04f214f
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 07127184efb629f1336c0592bfdacec258cab731
refs/heads/master: 482e6dc5261406fdb921946e70b51467b0305bad
2 changes: 1 addition & 1 deletion trunk/fs/btrfs/ctree.h
Original file line number Diff line number Diff line change
Expand Up @@ -2244,7 +2244,7 @@ int btrfs_block_rsv_add(struct btrfs_trans_handle *trans,
int btrfs_block_rsv_check(struct btrfs_trans_handle *trans,
struct btrfs_root *root,
struct btrfs_block_rsv *block_rsv,
u64 min_reserved, int min_factor);
u64 min_reserved, int min_factor, int flush);
int btrfs_block_rsv_migrate(struct btrfs_block_rsv *src_rsv,
struct btrfs_block_rsv *dst_rsv,
u64 num_bytes);
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -3705,7 +3705,7 @@ int btrfs_block_rsv_add(struct btrfs_trans_handle *trans,
int btrfs_block_rsv_check(struct btrfs_trans_handle *trans,
struct btrfs_root *root,
struct btrfs_block_rsv *block_rsv,
u64 min_reserved, int min_factor)
u64 min_reserved, int min_factor, int flush)
{
u64 num_bytes = 0;
int ret = -ENOSPC;
Expand All @@ -3728,7 +3728,7 @@ int btrfs_block_rsv_check(struct btrfs_trans_handle *trans,
if (!ret)
return 0;

ret = reserve_metadata_bytes(trans, root, block_rsv, num_bytes, 0);
ret = reserve_metadata_bytes(trans, root, block_rsv, num_bytes, flush);
if (!ret) {
block_rsv_add_bytes(block_rsv, num_bytes, 0);
return 0;
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/btrfs/free-space-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ int btrfs_truncate_free_space_cache(struct btrfs_root *root,
trans->block_rsv = root->orphan_block_rsv;
ret = btrfs_block_rsv_check(trans, root,
root->orphan_block_rsv,
0, 5);
0, 5, 0);
if (ret)
return ret;

Expand Down
6 changes: 3 additions & 3 deletions trunk/fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -3576,10 +3576,10 @@ void btrfs_evict_inode(struct inode *inode)
* doing the truncate.
*/
while (1) {
ret = btrfs_block_rsv_check(NULL, root, rsv, min_size, 0);
ret = btrfs_block_rsv_check(NULL, root, rsv, min_size, 0, 1);
if (ret) {
printk(KERN_WARNING "Could not get space for a "
"delete, will truncate on mount\n");
"delete, will truncate on mount %d\n", ret);
btrfs_orphan_del(NULL, inode);
btrfs_free_block_rsv(root, rsv);
goto no_delete;
Expand Down Expand Up @@ -6575,7 +6575,7 @@ static int btrfs_truncate(struct inode *inode)
btrfs_add_ordered_operation(trans, root, inode);

while (1) {
ret = btrfs_block_rsv_check(trans, root, rsv, min_size, 0);
ret = btrfs_block_rsv_check(trans, root, rsv, min_size, 0, 1);
if (ret) {
/*
* This can only happen with the original transaction we
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/btrfs/relocation.c
Original file line number Diff line number Diff line change
Expand Up @@ -2042,7 +2042,7 @@ static noinline_for_stack int merge_reloc_root(struct reloc_control *rc,
trans->block_rsv = rc->block_rsv;

ret = btrfs_block_rsv_check(trans, root, rc->block_rsv,
min_reserved, 0);
min_reserved, 0, 0);
if (ret) {
BUG_ON(ret != -EAGAIN);
ret = btrfs_commit_transaction(trans, root);
Expand Down Expand Up @@ -3775,7 +3775,7 @@ static noinline_for_stack int relocate_block_group(struct reloc_control *rc)
}

ret = btrfs_block_rsv_check(trans, rc->extent_root,
rc->block_rsv, 0, 5);
rc->block_rsv, 0, 5, 0);
if (ret < 0) {
if (ret != -EAGAIN) {
err = ret;
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/btrfs/transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 04f214f

Please sign in to comment.