search for: extent_root

Displaying 20 results from an estimated 53 matches for "extent_root".

2009 May 12
0
[PATCH 1/2] btrfs-progs: mixed back ref support
...s_info->tree_root, - &new_root->root_key, &new_root->root_item); - BUG_ON(ret); - - ret = commit_tree_roots(trans, fs_info); - BUG_ON(ret); - ret = __commit_transaction(trans, root); - BUG_ON(ret); - write_ctree_super(trans, root); - btrfs_finish_extent_commit(trans, fs_info->extent_root, - &fs_info->pinned_extents); - btrfs_free_transaction(root, trans); - fs_info->running_transaction = NULL; - - trans = btrfs_start_transaction(root, 1); - ret = btrfs_drop_snapshot(trans, new_root); - BUG_ON(ret); - ret = btrfs_del_root(trans, fs_info->tree_root, &new...
2009 Aug 24
0
[PATCH] Btrfs: proper metadata -ENOSPC handling
...ripes(struct btrfs_root *root, BUG_ON(ret); while (nr--) { + cache->bytes_super += stripe_len; ret = add_excluded_extent(root, logical[nr], stripe_len); BUG_ON(ret); @@ -295,6 +296,9 @@ static int caching_kthread(void *data) return -ENOMEM; exclude_super_stripes(extent_root, block_group); + spin_lock(&block_group->space_info->lock); + block_group->space_info->bytes_super += block_group->bytes_super; + spin_unlock(&block_group->space_info->lock); last = max_t(u64, block_group->key.objectid, BTRFS_SUPER_INFO_OFFSET); @@ -2069,7 +207...
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
2013 Jun 08
0
[PATCH] Btrfs-progs: elaborate error handling of mkfs
...6 @@ static int make_root_dir(struct btrfs_root *root, int mixed) BTRFS_BLOCK_GROUP_SYSTEM, BTRFS_FIRST_CHUNK_TREE_OBJECTID, 0, BTRFS_MKFS_SYSTEM_GROUP_SIZE); - BUG_ON(ret); + if (ret) + goto err; if (mixed) { ret = btrfs_alloc_chunk(trans, root->fs_info->extent_root, &chunk_start, &chunk_size, BTRFS_BLOCK_GROUP_METADATA | BTRFS_BLOCK_GROUP_DATA); - BUG_ON(ret); + if (ret) + goto err; ret = btrfs_make_block_group(trans, root, 0, BTRFS_BLOCK_GROUP_METADATA | BTRFS_BLOCK_GROUP_DATA, BTRFS_FIRST_CHU...
2010 Apr 19
0
[PATCH 08/12] Btrfs: Introduce global metadata reservation
...dirty = 1; + fs_info->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; + ret = btrfs_read_block_groups(extent_root); if (ret) { printk(KERN_ERR "Failed to read block groups: %d\n", ret); goto fail_block_groups; } - fs_info->generation = generation; - fs_info->last_trans_committed = generation; - fs_info->data_alloc_profile = (u64)-1; - fs_info->metadata_alloc_profile = (u64)-1;...
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...= btrfs_truncate_item(trans, root, path, item_size, 1); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); } btrfs_mark_buffer_dirty(leaf); return 0; @@ -1801,7 +1801,7 @@ static int __btrfs_inc_extent_ref(struct btrfs_trans_handle *trans, ret = insert_extent_backref(trans, root->fs_info->extent_root, path, bytenr, parent, root_objectid, owner, offset, refs_to_add); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); out: btrfs_free_path(path); return err; @@ -2003,7 +2003,7 @@ static int run_one_delayed_ref(struct btrfs_trans_handle *trans, ret = btrfs_del_csums(trans, root...
2013 Mar 15
0
[PATCH] Btrfs-progs: add skinny metadata support to progs V3
...root, bytenr, - found_key.offset, 0, 0); + bytes, 0, 0); if (ret) break; } @@ -3128,7 +3159,8 @@ static int fixup_extent_refs(struct btrfs_trans_handle *trans, /* remember our flags for recreating the extent */ ret = btrfs_lookup_extent_info(NULL, info->extent_root, rec->start, - rec->max_size, NULL, &flags); + rec->max_size, rec->metadata, NULL, + &flags); if (ret < 0) flags = BTRFS_BLOCK_FLAG_FULL_BACKREF; @@ -3677,6 +3709,8 @@ out: (unsigned long long)total_btree_bytes); printf("to...
2012 Mar 15
0
[PATCH] Btrfs: fix deadlock during allocating chunks
...sh, type); + dump_space_info(info, 0, 0); + } + + if (left < thresh) { + u64 flags; + + flags = btrfs_get_alloc_profile(root->fs_info->chunk_root, 0); + btrfs_alloc_chunk(trans, root, flags); + } +} + static int do_chunk_alloc(struct btrfs_trans_handle *trans, struct btrfs_root *extent_root, u64 alloc_bytes, u64 flags, int force) @@ -3468,6 +3512,12 @@ again: force_metadata_allocation(fs_info); } + /* + * Check if we have enough space in SYSTEM chunk because we may need + * to update devices. + */ + check_system_chunk(trans, extent_root, flags); + ret = btrfs_alloc_...
2013 May 14
1
[PATCH] Btrfs-progs: fix missing recow roots when making btrfs filesystem
...t_generation(&info->tree_root->root_item); + if (generation != trans->transid) { + ret = __btrfs_cow_block(trans, info->tree_root, + info->tree_root->node, NULL, 0, &tmp, 0, 0); + BUG_ON(ret); + free_extent_buffer(tmp); + } - ret = __btrfs_cow_block(trans, info->extent_root, + generation = btrfs_root_generation(&info->extent_root->root_item); + if (generation != trans->transid) { + ret = __btrfs_cow_block(trans, info->extent_root, info->extent_root->node, NULL, 0, &tmp, 0, 0); - BUG_ON(ret); - free_extent_buffer(tmp); - - ret = __btrfs_...
2013 Sep 05
3
[PATCH v2 0/3] btrfs-progs: prevent mkfs from aborting with small volume
Here are 3 patches to avoid undesired aborts of mkfs.btrfs. These are based on top of Chris''s btrfs-progs.git: git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git Thanks, H.Seto Hidetoshi Seto (3): btrfs-progs: error if device for mkfs is too small btrfs-progs: error if device have no space to make primary chunks btrfs-progs: calculate available
2010 May 11
0
[PATCH 4/5] btrfs: don't cache empty block groups during mount
...p 4/fs/btrfs/extent-tree.c 8/fs/btrfs/extent-tree.c --- 4/fs/btrfs/extent-tree.c 2010-05-11 14:15:29.174108554 +0800 +++ 8/fs/btrfs/extent-tree.c 2010-05-11 13:26:38.036107000 +0800 @@ -316,11 +329,6 @@ static int caching_kthread(void *data) if (!path) return -ENOMEM; - exclude_super_stripes(extent_root, block_group); - spin_lock(&block_group->space_info->lock); - block_group->space_info->bytes_super += block_group->bytes_super; - spin_unlock(&block_group->space_info->lock); - last = max_t(u64, block_group->key.objectid, BTRFS_SUPER_INFO_OFFSET); /* @@ -7499,6...
2013 Mar 04
0
[PATCH 2/2] Btrfs: fix unclosed transaction handler when the async transaction commitment fails
...it_transaction(trans, root); } else { err = btrfs_commit_transaction(trans, root); } @@ -592,6 +594,8 @@ static int create_snapshot(struct btrfs_root *root, struct inode *dir, *async_transid = trans->transid; ret = btrfs_commit_transaction_async(trans, root->fs_info->extent_root, 1); + if (ret) + ret = btrfs_commit_transaction(trans, root); } else { ret = btrfs_commit_transaction(trans, root->fs_info->extent_root); -- 1.6.5.2 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo...
2011 Oct 22
7
Kernel BUG unable to handle kernel NULL pointer dereference
Hello, I got a kernel bug error, my guess from BTRFS. Here is the report, Oct 22 20:44:43 localhost kernel: [25554.947970] BUG: unable to handle kernel NULL pointer dereference at 0000000000000030 Oct 22 20:44:43 localhost kernel: [25554.948002] IP: [<ffffffffa01ab027>] btrfs_print_leaf+0x37/0x880 [btrfs] Oct 22 20:44:43 localhost kernel: [25554.948037] PGD bfa44067 PUD bfa43067 PMD 0 Oct
2011 Jun 09
2
[PATCH] Btrfs: turn to readonly if btrfs_start_transaction() fails
...start_transaction(root, 6); if (IS_ERR(trans)) { dput(parent); + btrfs_abort_transaction(root, PTR_ERR(trans)); return PTR_ERR(trans); } @@ -476,6 +477,7 @@ static int create_snapshot(struct btrfs_root *root, struct dentry *dentry, trans = btrfs_start_transaction(root->fs_info->extent_root, 5); if (IS_ERR(trans)) { ret = PTR_ERR(trans); + btrfs_abort_transaction(root->fs_info->extent_root, ret); goto fail; } @@ -1242,6 +1244,7 @@ static noinline int btrfs_ioctl_resize(struct btrfs_root *root, trans = btrfs_start_transaction(root, 0); if (IS_ERR(trans)) {...
2013 Jan 10
0
[PATCH 03/11] Btrfs: use atomic for fs_info->last_trans_log_full_commit
...g mount_opt; unsigned long compress_type:4; u64 max_inline; diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 2d9fe27..a302e3a 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -7894,7 +7894,8 @@ int btrfs_make_block_group(struct btrfs_trans_handle *trans, extent_root = root->fs_info->extent_root; - root->fs_info->last_trans_log_full_commit = trans->transid; + atomic64_set(&root->fs_info->last_trans_log_full_commit, + trans->transid); cache = kzalloc(sizeof(*cache), GFP_NOFS); if (!cache) diff --git a/fs/btrfs/inode.c b/...
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
2012 Dec 13
22
[PATCH] Btrfs: fix a deadlock on chunk mutex
...ta for updaing devices and chunk tree */ + /* metadata for adding/updating devices and chunk tree */ + num_dev = num_dev << 1 return btrfs_calc_trans_metadata_size(root, num_dev + 1); } @@ -4351,7 +4353,7 @@ static void init_global_block_rsv(struct btrfs_fs_info *fs_info) fs_info->extent_root->block_rsv = &fs_info->global_block_rsv; fs_info->csum_root->block_rsv = &fs_info->global_block_rsv; - fs_info->dev_root->block_rsv = &fs_info->global_block_rsv; + fs_info->dev_root->block_rsv = &fs_info->chunk_block_rsv; fs_info->tree_root-&g...
2011 May 02
5
[PATCH v3 0/3] btrfs: quasi-round-robin for chunk allocation
In a multi device setup, the chunk allocator currently always allocates chunks on the devices in the same order. This leads to a very uneven distribution, especially with RAID1 or RAID10 and an uneven number of devices. This patch always sorts the devices before allocating, and allocates the stripes on the devices with the most available space, as long as there is enough space available. In a low
2012 May 27
0
[RFC PATCH] Decrease Metadata Fragment Using A Caterpillar Band Method
...struct btrfs_trans_handle *trans, + struct btrfs_root *root, + u64 parent, u64 root_objectid, + u64 flags, struct btrfs_disk_key *key, + int level, struct btrfs_key *ins, u8 cater); static int do_chunk_alloc(struct btrfs_trans_handle *trans, struct btrfs_root *extent_root, u64 alloc_bytes, u64 flags, int force); @@ -1978,10 +1988,16 @@ static int run_delayed_data_ref(struct b BUG_ON(extent_op->update_key); flags |= extent_op->flags_to_set; } - ret = alloc_reserved_file_extent(trans, root, + if (extent_op->cater_index_factor < 2) + re...
2011 Apr 12
3
[PATCH v2 0/3] btrfs: quasi-round-robin for chunk allocation
In a multi device setup, the chunk allocator currently always allocates chunks on the devices in the same order. This leads to a very uneven distribution, especially with RAID1 or RAID10 and an uneven number of devices. This patch always sorts the devices before allocating, and allocates the stripes on the devices with the most available space, as long as there is enough space available. In a low