Displaying 6 results from an estimated 6 matches for "btrfs_set_trans_block_group".
2011 May 11
8
[PATCH 1/4] Btrfs: map the node block when looking for readahead targets
If we have particularly full nodes, we could call btrfs_node_blockptr up to 32
times, which is 32 pairs of kmap/kunmap, which _sucks_. So go ahead and map the
extent buffer while we look for readahead targets. Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com>
---
fs/btrfs/ctree.c | 23 +++++++++++++++++++++--
1 files changed, 21 insertions(+), 2 deletions(-)
diff --git
2009 Aug 24
0
[PATCH] Btrfs: proper metadata -ENOSPC handling
...8 @@ static noinline int dirty_and_release_pages(struct btrfs_trans_handle *trans,
lock_extent(io_tree, start_pos, end_of_last_block, GFP_NOFS);
trans = btrfs_join_transaction(root, 1);
- if (!trans) {
- err = -ENOMEM;
+ if (IS_ERR(trans)) {
+ err = PTR_ERR(trans);
goto out_unlock;
}
btrfs_set_trans_block_group(trans, inode);
@@ -323,6 +323,10 @@ noinline int btrfs_drop_extents(struct btrfs_trans_handle *trans,
while (1) {
recow = 0;
btrfs_release_path(root, path);
+ ret = btrfs_extend_transaction(trans, root, 1);
+ if (ret)
+ goto out;
+
ret = btrfs_lookup_file_extent(trans, root, path, in...
2007 Jun 29
2
Mknod: Operation not permitted
When trying to move my root to a btrfs filesystem, I found a missing
feature (or a bug). It's not possible to create device files. To
reproduce, run this on a btrfs filesystem:
mknod test c 1 1
result:
mknod: `test': Operation not permitted
Frank
2008 Jun 24
1
[RFC][PATCH] btrfs orphan code
...rfs_trans_handle *trans;
+ struct btrfs_key key;
+ int err = 0, drop_on_err = 0;
+ u64 objectid = 0;
+ unsigned long nr = 1;
+
+ mutex_lock(&root->fs_info->fs_mutex);
+ err = btrfs_check_free_space(root, 1, 0);
+ if (err)
+ goto out_unlock;
+
+ trans = btrfs_start_transaction(root, 1);
+ btrfs_set_trans_block_group(trans, dir);
+
+ if (IS_ERR(trans)) {
+ err = PTR_ERR(trans);
+ goto out_unlock;
+ }
+
+ err = btrfs_find_free_objectid(trans, root, dir->i_ino, &objectid);
+ if (err) {
+ err = -ENOSPC;
+ goto out_unlock;
+ }
+
+ inode = btrfs_new_inode(trans, root, ".orphandir", 10, dir->i...
2010 Apr 19
0
[PATCH 08/12] Btrfs: Introduce global metadata reservation
...ode)
return 0;
if (wait) {
@@ -3906,10 +3906,19 @@ void btrfs_dirty_inode(struct inode *ino
{
struct btrfs_root *root = BTRFS_I(inode)->root;
struct btrfs_trans_handle *trans;
+ int ret;
+
+ if (BTRFS_I(inode)->dummy_inode)
+ return;
trans = btrfs_join_transaction(root, 1);
btrfs_set_trans_block_group(trans, inode);
- btrfs_update_inode(trans, root, inode);
+
+ ret = btrfs_update_inode(trans, root, inode);
+ if (ret)
+ printk(KERN_ERR"btrfs: fail to dirty inode %lu error %d\n",
+ inode->i_ino, ret);
+
btrfs_end_transaction(trans, root);
}
Only in 9/fs/btrfs: inode.c.rej
diff...
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...oc_reserved_file_extent(trans, root,
root->root_key.objectid,
inode->i_ino, file_pos, &ins);
- BUG_ON(ret);
+ btrfs_fixable_bug_on(ret);
btrfs_free_path(path);
return 0;
@@ -1677,7 +1677,7 @@ static int btrfs_finish_ordered_io(struct inode *inode, u64 start, u64 end)
btrfs_set_trans_block_group(trans, inode);
trans->block_rsv = &root->fs_info->delalloc_block_rsv;
ret = btrfs_update_inode(trans, root, inode);
- BUG_ON(ret);
+ btrfs_fixable_bug_on(ret);
}
goto out;
}
@@ -1698,7 +1698,7 @@ static int btrfs_finish_ordered_io(struct inode *inode, u64 start, u64...