Displaying 3 results from an estimated 3 matches for "btrfs_block_rsv_migrate".
2011 Nov 01
0
[PATCH] Btrfs: release metadata from global reserve if we have to fallback for unlink
...by: Josef Bacik <josef@redhat.com>
---
fs/btrfs/inode.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index f12747c..3dd2d5d 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -2900,7 +2900,7 @@ out:
if (!err)
err = btrfs_block_rsv_migrate(trans->block_rsv,
&root->fs_info->global_block_rsv,
- btrfs_calc_trans_metadata_size(root, 1));
+ trans->bytes_reserved);
if (err) {
btrfs_end_transaction(trans, root);
@@ -2916,6 +2916,9 @@ static void __unlink_end_trans(struct btrfs_trans_handle *trans,...
2012 Jan 05
4
[RFC][PATCH 3/3] Btrfs: improve truncation of btrfs
...the orphan item we''re going to add
- * 1 for the orphan item deletion
* 1 for updating the inode.
*/
- trans = btrfs_start_transaction(root, 4);
- if (IS_ERR(trans)) {
- err = PTR_ERR(trans);
- goto out;
- }
-
- /* Migrate the slack space for the truncate to our reserve */
- ret = btrfs_block_rsv_migrate(&root->fs_info->trans_block_rsv, rsv,
- min_size);
- BUG_ON(ret);
-
- ret = btrfs_orphan_add(trans, inode);
- if (ret) {
- btrfs_end_transaction(trans, root);
- goto out;
- }
+ trans = btrfs_start_transaction(root, 2);
+ if (IS_ERR(trans))
+ return PTR_ERR(trans);
/*
*...
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...node, 0, ordered_extent);
ret = btrfs_update_inode(trans, root, inode);
- BUG_ON(ret);
+ btrfs_fixable_bug_on(ret);
out:
btrfs_delalloc_release_metadata(inode, ordered_extent->len);
if (trans)
@@ -2060,7 +2060,7 @@ void btrfs_orphan_post_snapshot(struct btrfs_trans_handle *trans,
ret = btrfs_block_rsv_migrate(&pending->block_rsv,
root->orphan_block_rsv,
num_bytes);
- BUG_ON(ret);
+ btrfs_fixable_bug_on(ret);
}
/* setup orphan block reservation for the snapshot */
@@ -2073,14 +2073,14 @@ void btrfs_orphan_post_snapshot(struct btrfs_trans_handle *trans,
num_byte...