search for: commit_root

Displaying 14 results from an estimated 14 matches for "commit_root".

2013 May 20
2
[PATCH] Btrfs: fix estale with btrfs send
This fixes bugzilla 57491. If we take a snapshot of a fs with a unlink ongoing and then try to send that root we will run into problems. When comparing with a parent root we will search the parents and the send roots commit_root, which if we''ve just created the snapshot will include the file that needs to be evicted by the orphan cleanup. So when we find a changed extent we will try and copy that info into the send stream, but when we lookup the inode we use the normal root, which no longer has the inode because...
2011 Mar 23
0
[PATCH] Btrfs: cleanup some BUG_ON()
...btrfs_lookup_leaf_ref(root, leaf->start); BUG_ON(!ref); @@ -7627,7 +7637,8 @@ static noinline int init_reloc_tree(stru return 0; root_item = kmalloc(sizeof(*root_item), GFP_NOFS); - BUG_ON(!root_item); + if (!root_item) + return -ENOMEM; ret = btrfs_copy_root(trans, root, root->commit_root, &eb, BTRFS_TREE_RELOC_OBJECTID); @@ -7653,7 +7664,7 @@ static noinline int init_reloc_tree(stru reloc_root = btrfs_read_fs_root_no_radix(root->fs_info->tree_root, &root_key); - BUG_ON(!reloc_root); + BUG_ON(IS_ERR(reloc_root)); reloc_root->last_trans = tran...
2011 May 18
0
[PATCH] BTRFS: Remove unused node_lock
...btrfs/ctree.h index 8f4b81d..f290b98 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -1088,9 +1088,6 @@ struct btrfs_fs_info { struct btrfs_root { struct extent_buffer *node; - /* the node lock is held while changing the node pointer */ - spinlock_t node_lock; - struct extent_buffer *commit_root; struct btrfs_root *log_root; struct btrfs_root *reloc_root; diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 228cf36..64b2896 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -1064,7 +1064,6 @@ static int __setup_root(u32 nodesize, u32 leafsize, u32 sectorsize, INIT_LIST...
2009 Jun 03
0
[PATCH] Make sure all dirty blocks are written at commit time
...bt &root->root_key, &root->root_item); BUG_ON(ret); - btrfs_write_dirty_block_groups(trans, root); - ret = btrfs_run_delayed_refs(trans, root, (unsigned long)-1); + ret = btrfs_write_dirty_block_groups(trans, root); BUG_ON(ret); } free_extent_buffer(root->commit_root); @@ -495,9 +491,6 @@ static noinline int commit_cowonly_roots root = list_entry(next, struct btrfs_root, dirty_list); update_cowonly_root(trans, root); - - ret = btrfs_run_delayed_refs(trans, root, (unsigned long)-1); - BUG_ON(ret); } return 0; } -- To unsubscribe from this list: se...
2009 May 12
0
[PATCH 1/2] btrfs-progs: mixed back ref support
...ast_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, + 0, root->root_key.objectid, level, 0);...
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
2012 Jun 21
0
[RFC PATCH V2] Btrfs: introduce extent buffer cache for each i-node
...ock_level = -1; - - if (cow && (p->keep_locks || p->lowest_level)) - write_lock_level = BTRFS_MAX_LEVEL; - - min_write_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...
2008 Jun 24
1
[RFC][PATCH] btrfs orphan code
...c Tue Jun 24 21:04:39 2008 -0400 @@ -701,8 +701,10 @@ static int __setup_root(u32 nodesize, u3 struct btrfs_fs_info *fs_info, u64 objectid) { + printk(KERN_ERR "setting up root %p\n", root); root->node = NULL; root->inode = NULL; + root->orphan_dir = NULL; root->commit_root = NULL; root->sectorsize = sectorsize; root->nodesize = nodesize; @@ -720,6 +722,7 @@ static int __setup_root(u32 nodesize, u3 root->in_sysfs = 0; INIT_LIST_HEAD(&root->dirty_list); + INIT_LIST_HEAD(&root->orphan_list); memset(&root->root_key, 0, sizeof(roo...
2009 Aug 24
0
[PATCH] Btrfs: proper metadata -ENOSPC handling
...gt;delayed_ref_updates; @@ -4895,6 +4896,7 @@ int btrfs_drop_snapshot(struct btrfs_root *root, int update_ref) update); } } + btrfs_release_path(root, path); BUG_ON(err); @@ -6027,7 +6029,7 @@ int btrfs_drop_dead_reloc_roots(struct btrfs_root *root) BUG_ON(reloc_root->commit_root != NULL); while (1) { trans = btrfs_join_transaction(root, 1); - BUG_ON(!trans); + BUG_ON(IS_ERR(trans)); mutex_lock(&root->fs_info->drop_mutex); ret = btrfs_drop_snapshot(trans, reloc_root); @@ -6329,7 +6331,7 @@ static noinline int relocate_one_extent(struct btrfs_r...
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...ans); ret = btrfs_commit_transaction(trans, root); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); } location.objectid = BTRFS_DATA_RELOC_TREE_OBJECTID; @@ -7241,7 +7241,7 @@ static noinline int init_reloc_tree(struct btrfs_trans_handle *trans, ret = btrfs_copy_root(trans, root, root->commit_root, &eb, BTRFS_TREE_RELOC_OBJECTID); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); root_key.objectid = BTRFS_TREE_RELOC_OBJECTID; root_key.offset = root->root_key.objectid; @@ -7258,7 +7258,7 @@ static noinline int init_reloc_tree(struct btrfs_trans_handle *trans, ret = btrfs_...
2011 Aug 26
0
[PATCH] Btrfs: make some functions return void
...stripesize, struct btrfs_root *root, - struct btrfs_fs_info *fs_info, - u64 objectid) +static void __setup_root(u32 nodesize, u32 leafsize, u32 sectorsize, + u32 stripesize, struct btrfs_root *root, + struct btrfs_fs_info *fs_info, + u64 objectid) { root->node = NULL; root->commit_root = NULL; @@ -1116,8 +1116,6 @@ static int __setup_root(u32 nodesize, u32 leafsize, u32 sectorsize, INIT_LIST_HEAD(&root->anon_super.s_list); INIT_LIST_HEAD(&root->anon_super.s_instances); init_rwsem(&root->anon_super.s_umount); - - return 0; } static int find_and_setup...
2013 Aug 19
11
[RFC PATCH] Btrfs: fix memory leak of orphan block rsv
...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 inode will end up being called by inode.c:btrfs_evict_node() (via the VFS). So my likely dirty hack, after some debugging, of freeing the orphan block rsv in btrfs_evict_inode() if its not being used by other tasks...
2011 Jun 21
19
[GIT PULL v3] Btrfs: improve write ahead log with sub transaction
I''ve been working to try to improve the write-ahead log''s performance, and I found that the bottleneck addresses in the checksum items, especially when we want to make a random write on a large file, e.g a 4G file. Then a idea for this suggested by Chris is to use sub transaction ids and just to log the part of inode that had changed since either the last log commit or the last
2011 Oct 04
68
[patch 00/65] Error handling patchset v3
Hi all - Here''s my current error handling patchset, against 3.1-rc8. Almost all of this patchset is preparing for actual error handling. Before we start in on that work, I''m trying to reduce the surface we need to worry about. It turns out that there is a ton of code that returns an error code but never actually reports an error. The patchset has grown to 65 patches. 46 of them