search for: free_extent_buffer

Displaying 20 results from an estimated 41 matches for "free_extent_buffer".

2013 May 14
1
[PATCH] Btrfs-progs: fix missing recow roots when making btrfs filesystem
...1,55 @@ static int recow_roots(struct btrfs_trans_handle *trans, int ret; struct extent_buffer *tmp; struct btrfs_fs_info *info = root->fs_info; + u64 generation; - ret = __btrfs_cow_block(trans, info->fs_root, info->fs_root->node, - NULL, 0, &tmp, 0, 0); - BUG_ON(ret); - free_extent_buffer(tmp); + generation = btrfs_root_generation(&info->fs_root->root_item); + if (generation != trans->transid) { + ret = __btrfs_cow_block(trans, info->fs_root, + info->fs_root->node, NULL, 0, &tmp, 0, 0); + BUG_ON(ret); + free_extent_buffer(tmp); + } - ret = __btrfs_c...
2013 Jun 17
0
[PATCH] Btrfs: optimize reada_for_balance
...0; - int ret = 0; int blocksize; parent = path->nodes[level + 1]; if (!parent) - return 0; + return; nritems = btrfs_header_nritems(parent); slot = path->slots[level + 1]; @@ -2224,28 +2219,11 @@ static noinline int reada_for_balance(struct btrfs_root *root, block2 = 0; free_extent_buffer(eb); } - if (block1 || block2) { - ret = -EAGAIN; - - /* release the whole path */ - btrfs_release_path(path); - /* read the blocks */ - if (block1) - readahead_tree_block(root, block1, blocksize, 0); - if (block2) - readahead_tree_block(root, block2, blocksize, 0); - - if (block1) {...
2012 Jul 31
0
[PATCH V2 1/2] Btrfs: fix error path in create_pending_snapshot()
...ansaction aborted */ + goto abort_trans; record_root_in_trans(trans, root); btrfs_set_root_last_snapshot(&root->root_item, trans->transid); @@ -1021,7 +1017,7 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans, if (ret) { btrfs_tree_unlock(old); free_extent_buffer(old); - goto abort_trans_dput; + goto abort_trans; } btrfs_set_lock_blocking(old); @@ -1031,7 +1027,7 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans, btrfs_tree_unlock(old); free_extent_buffer(old); if (ret) - goto abort_trans_dput; + goto abort_tran...
2012 May 22
1
warnings met in introduce extent buffer cache for each i-node patch
...l_index); + inode, parent_ino, &local_index); } return ret; } Thanks. Tim May 22 09:23:57 bigbox kernel: [56455.532138] ------------[ cut here ]------------ May 22 09:23:57 bigbox kernel: [56455.532146] NG: at fs/btrfs/extent_io.c:3795 free_extent_buffer+0x31/6455.532189] Hardware name: PRIMEQUEST 1800E2 May 22 09:23:57 bigbox kernel: [56455.53nked in: scsi_ram lockd nf_conntrack_ipv4 nf_defrag_ipv4 xtfat ioatdma i2c_i801 i7core_edac e1000e microcode edac_core i2c_core igb iTCO_wdt iTCO_vendor_support dca uinput sunrpc usb_stortsas mptscsih mptbase...
2013 Oct 17
0
[PATCH] Btrfs-progs: fix btrfsck improper prompt on dropping snapshots
...ri)); - buf = read_tree_block(root->fs_info->tree_root, - btrfs_root_bytenr(&ri), - btrfs_level_size(root, - btrfs_root_level(&ri)), 0); - add_root_to_pending(buf, &extent_cache, &pending, - &seen, &nodes, &found_key); - free_extent_buffer(buf); + if (btrfs_disk_key_objectid(&ri.drop_progress) == 0) { + buf = read_tree_block(root->fs_info->tree_root, + btrfs_root_bytenr(&ri), + btrfs_level_size(root, + btrfs_root_level(&ri)), + 0); + add_root_to_pending(buf, &e...
2009 May 12
0
[PATCH 1/2] btrfs-progs: mixed back ref support
...- btrfs_free_extent(trans, root, buf->start, - buf->len, buf->start, - root->root_key.objectid, - btrfs_header_generation(buf), - level, 1); - } + + btrfs_free_extent(trans, root, buf->start, buf->len, + 0, root->root_key.objectid, level, 0); free_extent_buffer(buf); add_root_to_dirty_list(root); } else { @@ -202,9 +266,9 @@ int __btrfs_cow_block(struct btrfs_trans trans->transid); btrfs_mark_buffer_dirty(parent); WARN_ON(btrfs_header_generation(parent) != trans->transid); + btrfs_free_extent(trans, root, buf->start, buf...
2010 May 20
1
[PATCH 01/10] btrfs: add a return value for readahead_tree_block()
...root, u64 bytenr, u32 blocksize, buf = btrfs_find_create_tree_block(root, bytenr, blocksize); if (!buf) return 0; - read_extent_buffer_pages(&BTRFS_I(btree_inode)->io_tree, + ret = read_extent_buffer_pages(&BTRFS_I(btree_inode)->io_tree, buf, 0, 0, btree_get_extent, 0); free_extent_buffer(buf); return ret; -- 1.6.5.2 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
2012 Sep 06
2
[PATCH V4 01/12] Btrfs: fix error path in create_pending_snapshot()
...ansaction aborted */ + goto abort_trans; record_root_in_trans(trans, root); btrfs_set_root_last_snapshot(&root->root_item, trans->transid); @@ -1074,7 +1069,7 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans, if (ret) { btrfs_tree_unlock(old); free_extent_buffer(old); - goto abort_trans_dput; + goto abort_trans; } btrfs_set_lock_blocking(old); @@ -1084,7 +1079,7 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans, btrfs_tree_unlock(old); free_extent_buffer(old); if (ret) - goto abort_trans_dput; + goto abort_tran...
2013 Apr 25
0
[PATCH] Btrfs: remove almost all of the BUG()'s from tree-log.c
...ound_key.offset + 1; @@ -2083,7 +2110,10 @@ static noinline int walk_down_log_tree(struct btrfs_trans_handle *trans, BTRFS_TREE_LOG_OBJECTID); ret = btrfs_free_and_pin_reserved_extent(root, bytenr, blocksize); - BUG_ON(ret); /* -ENOMEM or logic errors */ + if (ret) { + free_extent_buffer(next); + return ret; + } } free_extent_buffer(next); continue; @@ -2156,7 +2186,8 @@ static noinline int walk_up_log_tree(struct btrfs_trans_handle *trans, ret = btrfs_free_and_pin_reserved_extent(root, path->nodes[*level]->start, path->nodes[*level]-&...
2013 Aug 27
7
[PATCH] Btrfs: fix deadlock in uuid scan kthread
...1] [<ffffffffa05bd9de>] ? btrfs_lookup_first_ordered_extent+0x5e/0xb0 [btrfs] [36700.671698] [<ffffffffa05e3e54>] __btrfs_write_out_cache+0x8c4/0xa80 [btrfs] [36700.671704] [<ffffffffa05e4362>] btrfs_write_out_cache+0xb2/0xf0 [btrfs] [36700.671710] [<ffffffffa05c4441>] ? free_extent_buffer+0x61/0xc0 [btrfs] [36700.671716] [<ffffffffa0594c82>] btrfs_write_dirty_block_groups+0x562/0x650 [btrfs] [36700.671723] [<ffffffffa0610092>] commit_cowonly_roots+0x171/0x24b [btrfs] [36700.671729] [<ffffffffa05a4dde>] btrfs_commit_transaction+0x4fe/0xa10 [btrfs] [36700.671735]...
2013 Aug 19
11
[RFC PATCH] Btrfs: fix memory leak of orphan block rsv
When adding orphans to an inode''s root, we start a transaction for that root that when ended in several places such as for example extent-tree.c:btrfs_remove_block_group(), inode.c:btrfs_unlink() and inode.c:btrfs_evict_node(), doesn''t result in a commit, that is, inode.c:btrfs_orphan_commit_root() doesn''t get called (via transaction.c:commit_fs_roots()). The respective
2012 Jun 21
0
[RFC PATCH V2] Btrfs: introduce extent buffer cache for each i-node
...- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -989,6 +989,9 @@ static noinline int __btrfs_cow_block(struct btrfs_trans_handle *trans, btrfs_free_tree_block(trans, root, buf, parent_start, last_ref); } + + buf->root_objectid = 0; + if (unlock_orig) btrfs_tree_unlock(buf); free_extent_buffer_stale(buf); @@ -1672,6 +1675,9 @@ static noinline int balance_level(struct btrfs_trans_handle *trans, path->locks[level] = 0; path->nodes[level] = NULL; clean_tree_block(trans, root, mid); + + mid->root_objectid = 0; + btrfs_tree_unlock(mid); /* once for the path */ free...
2009 Jul 07
0
[PATCH] speed up snapshot dropping
...path->slots[level]); + ret = btrfs_comp_cpu_keys(&key, &wc->update_progress); + if (ret < 0) + goto skip; + + wc->stage = UPDATE_BACKREF; + wc->shared_level = level - 1; + } + if (!btrfs_buffer_uptodate(next, generation)) { + btrfs_tree_unlock(next); + free_extent_buffer(next); + next = NULL; + } + } + + if (!next) { + next = read_tree_block(root, bytenr, blocksize, generation); + btrfs_tree_lock(next); + btrfs_set_lock_blocking(next); + } + + level--; + BUG_ON(level != btrfs_header_level(next)); + path->nodes[level] = next; + path->slots[level] = 0; +...
2013 Mar 31
9
BTRFS error in __btrfs_inc_extent_ref:1935: Object already exists
...video(F) [12451.489981] Pid: 1053, comm: btrfs Tainted: GF 3.8.5-gnu #1 [12451.489987] Call Trace: [12451.490006] [<ffffffff81058bef>] warn_slowpath_common+0x7f/0xc0 [12451.490020] [<ffffffff81058ce6>] warn_slowpath_fmt+0x46/0x50 [12451.490064] [<ffffffffa0220b37>] ? free_extent_buffer+0x37/0x90 [btrfs] [12451.490098] [<ffffffffa01da01f>] __btrfs_abort_transaction+0xdf/0x100 [btrfs] [12451.490204] [<ffffffffa01e6d8c>] ? insert_tree_block_ref+0x4c/0x70 [btrfs] [12451.490295] [<ffffffffa01e9908>] __btrfs_inc_extent_ref+0x1b8/0x200 [btrfs] [12451.490337] [<f...
2013 Jul 13
1
btrfs filesystem balance /mnt/btrfs -> segmentation fault (kernel BUG at fs/btrfs/relocation.c:3296!)
...480] [<ffffffffa0735a87>] relocate_block_group+0x212/0x503 [btrfs] [18483.577537] [<ffffffffa0735ec7>] btrfs_relocate_block_group+0x14f/0x283 [btrfs] [18483.577634] [<ffffffffa0715d8a>] btrfs_relocate_chunk.isra.65+0x50/0x3bc [btrfs] [18483.577731] [<ffffffffa0711d09>] ? free_extent_buffer+0x77/0x7c [btrfs] [18483.577788] [<ffffffffa07190cc>] btrfs_balance+0x9c2/0xb9a [btrfs] [18483.577838] [<ffffffff810b9117>] ? __do_fault+0x3d0/0x40a [18483.577888] [<ffffffff810e5e02>] ? __sb_start_write+0xbd/0xf1 [18483.577947] [<ffffffffa071e778>] btrfs_ioctl_balance+0...
2013 Feb 13
0
Re: Heavy memory leak when using quota groups
...5] [<ffffffffa051fb33>] btrfs_search_old_slot+0xb3/0x940 [btrfs] > [ 5123.800252] [<ffffffff810f78f7>] ? call_rcu_sched+0x17/0x20 > [ 5123.800263] [<ffffffffa055849e>] ? > release_extent_buffer.isra.26+0x5e/0xf0 [btrfs] > [ 5123.800273] [<ffffffffa055da17>] ? free_extent_buffer+0x37/0x90 [btrfs] > [ 5123.800280] [<ffffffffa0522d5d>] btrfs_next_old_leaf+0xed/0x450 [btrfs] > [ 5123.800290] [<ffffffffa05955b4>] __resolve_indirect_refs+0x334/0x620 [btrfs] > [ 5123.800301] [<ffffffffa059616a>] find_parent_nodes+0x7da/0xf90 [btrfs] > [ 5123.8003...
2012 Jul 30
4
balance disables nodatacow
I have a 3 disk raid1 filesystem mounted with nodatacow. I have a folder in said filesystem with the ''C'' NOCOW & ''Z'' Not_Compressed flags set for good measure. I then copy in a large file and proceed to make random modifications. Filefrag shows no additional extents created, good so far. A big thank you to the those devs who got that working. However, after
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...eaf, 0, nritems); @@ -4022,7 +4022,7 @@ int btrfs_del_items(struct btrfs_trans_handle *trans, struct btrfs_root *root, if (btrfs_header_nritems(leaf) == 0) { path->slots[1] = slot; ret = btrfs_del_leaf(trans, root, path, leaf); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); free_extent_buffer(leaf); } else { /* if we''re still in the path, make sure diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c index e807b14..ee1cf82 100644 --- a/fs/btrfs/delayed-ref.c +++ b/fs/btrfs/delayed-ref.c @@ -644,11 +644,11 @@ int btrfs_add_delayed_tree_ref(struct btrfs_trans_han...
2011 Jun 10
6
[PATCH v2 0/6] btrfs: generic readeahead interface
This series introduces a generic readahead interface for btrfs trees. The intention is to use it to speed up scrub in a first run, but balance is another hot candidate. In general, every tree walk could be accompanied by a readahead. Deletion of large files comes to mind, where the fetching of the csums takes most of the time. Also the initial build-ups of free-space-caches and
2013 Nov 27
0
[PATCH] Btrfs-progs: fix the mismatch of extent buffer's space
Now we set @refs to 2 on creating a new extent buffer, meanwhile we allocate the needed free space, but we don''t give enough free_extent_buffer() to reduce the eb''s references to zero so that the eb can finally be freed, so the problem is we has decrease the referene count of backrefs to zero, which ends up releasing the space occupied by the eb, and this space can be allocated again for something else(another eb or disk), usually...