search for: extent_buffer_get

Displaying 8 results from an estimated 8 matches for "extent_buffer_get".

2013 Nov 27
0
[PATCH] Btrfs-progs: fix the mismatch of extent buffer's space
...ons(+), 1 deletion(-) diff --git a/btrfs-convert.c b/btrfs-convert.c index ae10eed..cb6ddd0 100644 --- a/btrfs-convert.c +++ b/btrfs-convert.c @@ -1634,6 +1634,7 @@ static int init_btrfs(struct btrfs_root *root) ret = create_subvol(trans, root, BTRFS_DATA_RELOC_TREE_OBJECTID); BUG_ON(ret); + extent_buffer_get(fs_info->csum_root->node); ret = __btrfs_cow_block(trans, fs_info->csum_root, fs_info->csum_root->node, NULL, 0, &tmp, 0, 0); BUG_ON(ret); diff --git a/extent_io.c b/extent_io.c index ad07b9c..a127e54 100644 --- a/extent_io.c +++ b/extent_io.c @@ -580,7 +580,7 @@ static...
2012 Jun 21
0
[RFC PATCH V2] Btrfs: introduce extent buffer cache for each i-node
...ite_lock_level = write_lock_level; - -again: - /* - * we try very hard to do read locks on the root - */ - root_lock = BTRFS_READ_LOCK; - level = 0; - if (p->search_commit_root) { - /* - * the commit roots are read only - * so we always do read locks - */ - b = root->commit_root; - extent_buffer_get(b); - level = btrfs_header_level(b); - if (!p->skip_locking) - btrfs_tree_read_lock(b); - } else { - if (p->skip_locking) { - b = btrfs_root_node(root); - level = btrfs_header_level(b); - } else { - /* we don''t know the level of the root node - * until we actually have...
2013 Oct 16
0
[PATCH] Btrfs: add tests for btrfs_get_extent V2
...t_buffer(0, 4096); + if (!root->node) { + test_msg("Couldn''t allocate dummy buffer\n"); + goto out; + } + + /* + * We will just free a dummy node if it''s ref count is 2 so we need an + * extra ref so our searches don''t accidently release our page. + */ + extent_buffer_get(root->node); + btrfs_set_header_nritems(root->node, 0); + btrfs_set_header_level(root->node, 0); + ret = -EINVAL; + + /* First with no extents */ + BTRFS_I(inode)->root = root; + em = btrfs_get_extent(inode, NULL, 0, 0, 4096, 0); + if (IS_ERR(em)) { + em = NULL; + test_msg("Got a...
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
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...path(trans, root, keys, nodes, lowest_level); - BUG_ON(ret < 0); + btrfs_fixable_bug_on(ret < 0); if (ref_path->owner_objectid >= BTRFS_FIRST_FREE_OBJECTID) { ret = btrfs_search_slot(trans, reloc_root, first_key, path, 0, 0); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); extent_buffer_get(path->nodes[0]); eb = path->nodes[0]; btrfs_release_path(reloc_root, path); ret = invalidate_extent_cache(reloc_root, eb, group, root); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); free_extent_buffer(eb); } @@ -7397,7 +7397,7 @@ static noinline int relocate_tree_block(struct...
2009 May 12
0
[PATCH 1/2] btrfs-progs: mixed back ref support
...&& + (generation <= btrfs_root_last_snapshot(&root->root_item) || + btrfs_header_flag(buf, BTRFS_HEADER_FLAG_RELOC))) + __btrfs_update_ref(trans, root, buf, cow); + else clean_tree_block(trans, root, buf); - } if (buf == root->node) { root->node = cow; extent_buffer_get(cow); - if (buf != root->commit_root) { - 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, +...
2011 Jun 29
14
[PATCH v4 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
2011 Oct 06
26
[PATCH v0 00/18] btfs: Subvolume Quota Groups
This is a first draft of a subvolume quota implementation. It is possible to limit subvolumes and any group of subvolumes and also to track the amount of space that will get freed when deleting snapshots. The current version is functionally incomplete, with the main missing feature being the initial scan and rescan of an existing filesystem. I put some effort into writing an introduction into