search for: tree_root

Displaying 20 results from an estimated 65 matches for "tree_root".

2008 Mar 15
1
btrfs-0.13 breaks boot on reiserfs-3.6
Hi, I recompiled my kernel today, and when the btrfs-0.13 option is enabled (CONFIG_BTR_FS=y) I cannot boot on my reiserfs-3.6 partition any more. The kernel says that is cannot mount /dev/sdc6. I can boot the kernel when I recompile it with the same options and CONFIG_BTR_FS=n, and with the same boot options as well. Everything is amd64 on my system (kernel + programs). Here is a screenshot of
2011 Nov 09
6
[PATCH 0/5] Btrfs: mount error handling fixes
A bunch of fixes (memory leaks, NULL pointer dereferences and devices hanging in busy state) to sanitize error handling during mount sequence. This is on top of for-linus + slyfox''s double-free fix. Thanks, Ilya Ilya Dryomov (5): Btrfs: fix memory leak in btrfs_parse_early_options() Btrfs: fix subvol_name leak on error in btrfs_mount() Btrfs: avoid null dereference and leaks
2010 Dec 01
12
Fsck, parent transid verify failed
Hi folks! Been using btrfs for quite a while now, worked great until now. Got power-loss on my machine and now i have the "parent transid verify failed on X wanted X found X" problem. So I can''t get it to mount. My btrfs is spread over sda (2tb), sdc(2tb), sdd(1tb). Is this something that an offline fsck could fix ? If so is the fsck-util being developed ? Is there a way to
2013 Feb 13
1
[PATCH] Btrfs: fix crash in log replay with qgroups enabled
When replaying a log tree with qgroups enabled, tree_mod_log_rewind does a sanity-check of the number of items against the maximum possible number. It calculates that number with the nodesize of fs_root. Unfortunately fs_root is not yet set at this stage. So instead use the nodesize from tree_root, which is already initialized. Signed-off-by: Arne Jansen <sensille@gmx.net> --- fs/btrfs/ctree.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index eea5da7..6eff0fa 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -122...
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
..._submit_bio_hook(struct inode *inode, int rw, struct bio *bio, ret = btrfs_bio_wq_end_io(BTRFS_I(inode)->root->fs_info, bio, 1); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); if (!(rw & REQ_WRITE)) { /* @@ -974,7 +974,7 @@ static int find_and_setup_root(struct btrfs_root *tree_root, &root->root_item, &root->root_key); if (ret > 0) return -ENOENT; - BUG_ON(ret); + btrfs_fixable_bug_on(ret); generation = btrfs_root_generation(&root->root_item); blocksize = btrfs_level_size(root, btrfs_root_level(&root->root_item)); @@ -1501,7 +1...
2013 May 14
1
[PATCH] Btrfs-progs: fix missing recow roots when making btrfs filesystem
...fs_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_cow_block(trans, info->tree_root, info->tree_root->node, - NULL, 0, &tmp, 0, 0); - BUG_ON(ret); - free_extent_buffer(tmp); + generation = btrfs_root_generation(&info->tree_root->root_item); + if (generation != trans->transid) { + ret = __btrfs_cow_block(trans, info->tree_root, + info->tree_root-...
2008 Jun 24
1
[RFC][PATCH] btrfs orphan code
...uct btrfs_key *location, u8 type) + struct btrfs_key *location, u8 type, int index) { int ret = 0; int ret2 = 0; @@ -149,7 +149,7 @@ int btrfs_insert_dir_item(struct btrfs_t second_insert: /* FIXME, use some real flag for selecting the extra index */ - if (root == root->fs_info->tree_root) { + if (root == root->fs_info->tree_root || !index) { ret = 0; goto out; } @@ -179,6 +179,87 @@ out: if (ret2) return ret2; return 0; +} + +int btrfs_insert_orphan_dir_item(struct btrfs_trans_handle *trans, + struct btrfs_root *root, + struct btrfs_key *location) +{ +...
2011 May 30
5
Damaged super block / fs root
I have accidently damaged the first block(s) of a btrfs partition and can''t mount it anymore. I can see that my data is still intact by running a command like: cat /dev/sda5 | hexdump -C | more Do any (experimental) tools exist which would allow me to recover the files? Thank you -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a
2013 Oct 17
0
[PATCH] Btrfs-progs: fix btrfsck improper prompt on dropping snapshots
...; + INIT_LIST_HEAD(&dropping_trees); if (repair) { trans = btrfs_start_transaction(root, 1); @@ -5513,26 +5546,74 @@ again: offset = btrfs_item_ptr_offset(leaf, path.slots[0]); read_extent_buffer(leaf, &ri, offset, sizeof(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(&...
2010 Apr 19
0
[PATCH 08/12] Btrfs: Introduce global metadata reservation
...generation = generation; - fs_info->last_trans_committed = generation; - fs_info->data_alloc_profile = (u64)-1; - fs_info->metadata_alloc_profile = (u64)-1; - fs_info->system_alloc_profile = fs_info->metadata_alloc_profile; fs_info->cleaner_kthread = kthread_run(cleaner_kthread, tree_root, "btrfs-cleaner"); if (IS_ERR(fs_info->cleaner_kthread)) @@ -2439,15 +2437,15 @@ int close_ctree(struct btrfs_root *root) fs_info->closing = 1; smp_mb(); - kthread_stop(root->fs_info->transaction_kthread); - kthread_stop(root->fs_info->cleaner_kthrea...
2013 Apr 25
10
[PATCH v4 0/3] Btrfs: quota rescan for 3.10
The kernel side for rescan, which is needed if you want to enable qgroup tracking on a non-empty volume. The first patch splits btrfs_qgroup_account_ref into readable ans reusable units. The second patch adds the rescan implementation (refer to its commit message for a description of the algorithm). The third patch starts an automatic rescan when qgroups are enabled. It is only separated to
2007 Sep 23
0
[patch]fix get_bh and brelse issues when drop snapshot
...t;node); break; } for (i = 0; i <= orig_level; i++) { diff -r 29b8cc7794ac transaction.c --- a/transaction.c Thu Sep 20 14:14:42 2007 -0400 +++ b/transaction.c Sun Sep 23 12:35:00 2007 +0800 @@ -457,6 +457,7 @@ static int drop_dirty_roots(struct btrfs ret = btrfs_end_transaction(trans, tree_root); BUG_ON(ret); + btrfs_block_release(dirty->root, dirty->root->node); kfree(dirty->root); kfree(dirty); mutex_unlock(&tree_root->fs_info->fs_mutex);
2009 Jan 19
1
[PATCH] Btrfs: check return value for kthread_run() correctly
...sk-io.c index 81a3138..f718d25 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -1740,13 +1740,13 @@ struct btrfs_root *open_ctree(struct super_block *sb, fs_info->system_alloc_profile = fs_info->metadata_alloc_profile; fs_info->cleaner_kthread = kthread_run(cleaner_kthread, tree_root, "btrfs-cleaner"); - if (!fs_info->cleaner_kthread) + if (IS_ERR(fs_info->cleaner_kthread)) goto fail_csum_root; fs_info->transaction_kthread = kthread_run(transaction_kthread, tree_root, "btrfs-transaction"); - if (!fs_info->t...
2013 Mar 04
2
[PATCH 1/2] Btrfs: fix wrong handle at error path of create_snapshot() when the commit fails
...-ENOMEM; - return ret; + pending->error = -ENOMEM; + return 0; } new_root_item = kmalloc(sizeof(*new_root_item), GFP_NOFS); if (!new_root_item) { - ret = pending->error = -ENOMEM; + pending->error = -ENOMEM; goto root_item_alloc_fail; } - ret = btrfs_find_free_objectid(tree_root, &objectid); - if (ret) { - pending->error = ret; + pending->error = btrfs_find_free_objectid(tree_root, &objectid); + if (pending->error) goto no_free_objectid; - } btrfs_reloc_pre_snapshot(trans, pending, &to_reserve); if (to_reserve > 0) { - ret = btrfs_block...
2011 Mar 23
0
[PATCH] Btrfs: cleanup some BUG_ON()
...disk-io.c 2011-03-23 11:44:39.000000000 +0900 @@ -1160,7 +1160,10 @@ struct btrfs_root *btrfs_read_fs_root_no root, fs_info, location->objectid); path = btrfs_alloc_path(); - BUG_ON(!path); + if (!path) { + kfree(root); + return ERR_PTR(-ENOMEM); + } ret = btrfs_search_slot(NULL, tree_root, location, path, 0, 0); if (ret == 0) { l = path->nodes[0]; diff -urNp linux-2.6.38/fs/btrfs/extent-tree.c linux-2.6.38.new/fs/btrfs/extent-tree.c --- linux-2.6.38/fs/btrfs/extent-tree.c 2011-03-15 10:20:32.000000000 +0900 +++ linux-2.6.38.new/fs/btrfs/extent-tree.c 2011-03-23 11:28:09.0000...
2008 Jan 07
1
[PATCH]Add rollback support for the converter
...*root, - char *name, int namelen) +struct btrfs_root *create_subvol(struct btrfs_root *root, const char *name) { int ret; u64 objectid; @@ -1017,12 +1047,13 @@ struct btrfs_root *create_subvol(struct if (ret) goto fail; location.offset = (u64)-1; - ret = btrfs_insert_dir_item(trans, tree_root, name, namelen, + ret = btrfs_insert_dir_item(trans, tree_root, name, strlen(name), btrfs_super_root_dir(&fs_info->super_copy), &location, BTRFS_FT_DIR); if (ret) goto fail; - ret = btrfs_insert_inode_ref(trans, tree_root, name, namelen, objectid, + ret = btrfs_ins...
2009 Aug 24
0
[PATCH] Btrfs: proper metadata -ENOSPC handling
...+ spin_unlock(&block_group->space_info->lock); last = max_t(u64, block_group->key.objectid, BTRFS_SUPER_INFO_OFFSET); @@ -2069,7 +2073,11 @@ int btrfs_run_delayed_refs(struct btrfs_trans_handle *trans, if (root == root->fs_info->extent_root) root = root->fs_info->tree_root; + BUG_ON(IS_ERR(trans)); delayed_refs = &trans->transaction->delayed_refs; + if (!delayed_refs->num_entries) + return 0; + INIT_LIST_HEAD(&cluster); again: spin_lock(&delayed_refs->lock); @@ -2761,62 +2769,39 @@ void btrfs_set_inode_space_info(struct btrfs_root *r...
2010 Dec 01
2
[RFC PATCH 4/4 v2] Btrfs: deal with filesystem state at mount, umount
...struct btrfs_root *open_ctree(struct super_block *sb, if (!btrfs_super_root(disk_super)) goto fail_iput; + /* check filesystem state */ + fs_info->fs_state |= btrfs_super_flags(disk_super); + + btrfs_check_super_valid(fs_info, sb->s_flags & MS_RDONLY); + ret = btrfs_parse_options(tree_root, options); if (ret) { err = ret; @@ -2405,10 +2412,17 @@ int btrfs_commit_super(struct btrfs_root *root) up_write(&root->fs_info->cleanup_work_sem); trans = btrfs_join_transaction(root, 1); + if (IS_ERR(trans)) + return PTR_ERR(trans); + ret = btrfs_commit_transaction(trans,...
2013 Feb 20
1
[PATCH] Btrfs: fix cleaner thread not working with inode cache option
...230,8 +7230,9 @@ int btrfs_drop_inode(struct inode *inode) { struct btrfs_root *root = BTRFS_I(inode)->root; + /* the snap/subvol tree is on deleting */ if (btrfs_root_refs(&root->root_item) == 0 && - !btrfs_is_free_space_inode(inode)) + root != root->fs_info->tree_root) return 1; else return generic_drop_inode(inode); diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index a31cd93..375f31f 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -2171,6 +2171,12 @@ out_unlock: shrink_dcache_sb(root->fs_info->sb); btrfs_invalidate_inodes(dest);...
2008 Sep 25
0
[PATCH 2/4] Add shared reference cache
...u Sep 25 16:00:36 2008 +0800 +++ b/disk-io.c Thu Sep 25 16:02:11 2008 +0800 @@ -1430,6 +1430,8 @@ fs_info->btree_inode->i_mapping, GFP_NOFS); fs_info->do_barriers = 1; + btrfs_leaf_ref_tree_init(&fs_info->shared_ref_tree); + BTRFS_I(fs_info->btree_inode)->root = tree_root; memset(&BTRFS_I(fs_info->btree_inode)->location, 0, sizeof(struct btrfs_key)); diff -r 47aa0c51998a extent-tree.c --- a/extent-tree.c Thu Sep 25 16:00:36 2008 +0800 +++ b/extent-tree.c Thu Sep 25 16:02:11 2008 +0800 @@ -1091,15 +1091,25 @@ int btrfs_cache_ref(struct btrfs_tra...