search for: extent_key

Displaying 5 results from an estimated 5 matches for "extent_key".

2013 Feb 07
8
[RFC] Btrfs: Allow the compressed extent size limit to be modified v2
...rfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -144,7 +144,7 @@ struct tree_block { unsigned int key_ready:1; }; -#define MAX_EXTENTS 128 +#define MAX_EXTENTS 512 struct file_extent_cluster { u64 start; @@ -3055,6 +3055,7 @@ int relocate_data_extent(struct inode *inode, struct btrfs_key *extent_key, struct file_extent_cluster *cluster) { int ret; + struct btrfs_fs_info *fs_info = BTRFS_I(inode)->root->fs_info; if (cluster->nr > 0 && extent_key->objectid != cluster->end + 1) { ret = relocate_file_extent_cluster(inode, cluster); @@ -3066,12 +3067,12 @@ i...
2011 Mar 23
0
[PATCH] Btrfs: cleanup some BUG_ON()
...M; + } btrfs_assert_tree_locked(parent); parent_level = btrfs_header_level(parent); @@ -6899,7 +6904,11 @@ static noinline int get_new_locations(st } path = btrfs_alloc_path(); - BUG_ON(!path); + if (!path) { + if (exts != *extents) + kfree(exts); + return -ENOMEM; + } cur_pos = extent_key->objectid - offset; last_byte = extent_key->objectid + extent_key->offset; @@ -7423,7 +7432,8 @@ static noinline int replace_extents_in_l int ret; new_extent = kmalloc(sizeof(*new_extent), GFP_NOFS); - BUG_ON(!new_extent); + if (!new_extent) + return -ENOMEM; ref = btrfs_looku...
2010 Jun 10
0
[PATCH] [12/23] BTRFS: Clean up unused variables -- bugs
...===================================== --- linux-2.6.35-rc2-gcc.orig/fs/btrfs/relocation.c +++ linux-2.6.35-rc2-gcc/fs/btrfs/relocation.c @@ -3098,6 +3098,8 @@ static int add_tree_block(struct reloc_c BUG_ON(item_size != sizeof(struct btrfs_extent_item_v0)); ret = get_ref_objectid_v0(rc, path, extent_key, &ref_owner, NULL); + if (ret < 0) + return ret; BUG_ON(ref_owner >= BTRFS_MAX_LEVEL); level = (int)ref_owner; /* FIXME: get real generation */ @@ -4142,7 +4144,7 @@ int btrfs_reloc_clone_csums(struct inode btrfs_add_ordered_sum(inode, ordered, sums); } btrfs_pu...
2009 Aug 24
0
[PATCH] Btrfs: proper metadata -ENOSPC handling
...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_root *extent_root, trans = btrfs_start_transaction(extent_root, 1); - BUG_ON(!trans); + BUG_ON(IS_ERR(trans)); if (extent_key->objectid == 0) { ret = del_extent_zero(trans, extent_root, path, extent_key); @@ -6812,6 +6814,10 @@ int btrfs_read_block_groups(struct btrfs_root *root) &space_info); BUG_ON(ret); cache->space_info = space_info; + spin_lock(&cache->space_info->lock); + cache-&...
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...root->root_key.objectid); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); } } @@ -6798,7 +6798,7 @@ next: root->root_key.objectid, trans->transid, key.objectid); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); ret = btrfs_free_extent(trans, root, extent_key->objectid, @@ -6807,7 +6807,7 @@ next: btrfs_header_owner(leaf), btrfs_header_generation(leaf), key.objectid, 0); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); btrfs_release_path(root, path); key.offset += num_bytes; @@ -6825,7 +6825,7 @@ next: ret = btrfs_dr...