search for: empty_size

Displaying 10 results from an estimated 10 matches for "empty_size".

2009 Mar 20
1
[PATCH 2/4] Btrfs: clean up find_free_extent
...info *space_info; WARN_ON(num_bytes < root->sectorsize); @@ -2567,6 +2563,8 @@ static noinline int find_free_extent(struct btrfs_trans_handle *trans, ins->objectid = 0; ins->offset = 0; + space_info = __find_space_info(root->fs_info, data); + if (orig_root->ref_cows || empty_size) allowed_chunk_alloc = 1; @@ -2580,10 +2578,9 @@ static noinline int find_free_extent(struct btrfs_trans_handle *trans, last_ptr = &root->fs_info->last_data_alloc; if (last_ptr) { - if (*last_ptr) { + if (*last_ptr) hint_byte = *last_ptr; - last_wanted = *last_ptr; -...
2012 May 27
0
[RFC PATCH] Decrease Metadata Fragment Using A Caterpillar Band Method
...trans, root, buf->len, parent_start, + if (root->fs_info->cater_factor > 1) { + if (btrfs_cater_factor(btrfs_header_cater(buf)) > 1) + cow = btrfs_grab_cater_block(trans, root, buf, parent_start, + root->root_key.objectid, &disk_key, + level, search_start, empty_size, 1); + else + cow = btrfs_alloc_free_block_cater(trans, root, buf->len, parent_start, + root->root_key.objectid, &disk_key, + level, search_start, empty_size, 1); + } else { + cow = btrfs_alloc_free_block(trans, root, buf->len, parent_start, root->root...
2008 Oct 10
1
[PATCH] fix enospc when there is plenty of space
...ed_chunk_alloc = 0; + struct list_head *head = NULL, *cur = NULL; + int loop = 0; + struct btrfs_space_info *space_info; WARN_ON(num_bytes < root->sectorsize); btrfs_set_key_type(ins, BTRFS_EXTENT_ITEM_KEY); + ins->objectid = 0; + ins->offset = 0; if (orig_root->ref_cows || empty_size) allowed_chunk_alloc = 1; @@ -2239,152 +2199,132 @@ static int noinline find_free_extent(struct btrfs_trans_handle *trans, else empty_size += empty_cluster; } - search_start = max(search_start, first_logical_byte(root, 0)); - orig_search_start = search_start; - search_start = max(se...
2009 May 12
0
[PATCH 1/2] btrfs-progs: mixed back ref support
...s, root, buf); + } + + return 0; +} + int __btrfs_cow_block(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct extent_buffer *buf, @@ -135,26 +208,25 @@ int __btrfs_cow_block(struct btrfs_trans struct extent_buffer **cow_ret, u64 search_start, u64 empty_size) { - u64 parent_start; + u64 generation; struct extent_buffer *cow; - u32 nritems; - int ret = 0; - int different_trans = 0; + struct btrfs_disk_key disk_key; int level; WARN_ON(root->ref_cows && trans->transid != root->fs_info->running_transaction->transid); WA...
2008 Sep 30
0
[PATCH] fix seekiness due to finding the wrong block group
...Index: root/btrfs-unstable/fs/btrfs/extent-tree.c =================================================================== --- root.orig/btrfs-unstable/fs/btrfs/extent-tree.c +++ root/btrfs-unstable/fs/btrfs/extent-tree.c @@ -2238,7 +2238,10 @@ static int noinline find_free_extent(str total_needed += empty_size; new_group: - block_group = btrfs_lookup_first_block_group(info, search_start); + block_group = btrfs_lookup_block_group(info, search_start); + if (!block_group) + block_group = btrfs_lookup_first_block_group(info, + search_start); /* * Ok this looks a little tricky, buts its...
2011 May 25
0
[PATCH] Btrfs: cache bitmaps when searching for a cluster
...rn -ENOSPC; +search: node = &entry->offset_index; do { entry = rb_entry(node, struct btrfs_free_space, offset_index); @@ -2201,6 +2238,8 @@ int btrfs_find_space_cluster(struct btrfs_trans_handle *trans, struct btrfs_free_cluster *cluster, u64 offset, u64 bytes, u64 empty_size) { + struct list_head bitmaps; + struct btrfs_free_space *entry, *tmp; u64 min_bytes; int ret; @@ -2239,11 +2278,16 @@ int btrfs_find_space_cluster(struct btrfs_trans_handle *trans, goto out; } - ret = setup_cluster_no_bitmap(block_group, cluster, offset, bytes, - min_bytes);...
2010 Mar 02
3
2.6.33 high cpu usage
With the ATI bug I was hitting earlier fixed, only my btrfs partition continues to show high cpu usage for some operations. Rsync, git pull, git checkout and svn up are typicall operations which trigger the high cpu usage. As an example, this perf report is from using git checkout to change to a new branch; the change needed to checkout 208 files out of about 1600 total files. du(1) reports
2009 Aug 24
0
[PATCH] Btrfs: proper metadata -ENOSPC handling
...gt;data_chunk_allocations++; if (!(fs_info->data_chunk_allocations % fs_info->metadata_ratio)) @@ -3737,7 +3723,7 @@ static noinline int find_free_extent(struct btrfs_trans_handle *trans, space_info = __find_space_info(root->fs_info, data); - if (orig_root->ref_cows || empty_size) + if ((orig_root->ref_cows || empty_size) && !trans->is_relocate) allowed_chunk_alloc = 1; if (data & BTRFS_BLOCK_GROUP_METADATA) { @@ -4058,26 +4044,32 @@ static void dump_space_info(struct btrfs_space_info *info, u64 bytes) printk(KERN_INFO "space_info has %llu...
2012 Dec 13
22
[PATCH] Btrfs: fix a deadlock on chunk mutex
An user reported that he has hit an annoying deadlock while playing with ceph based on btrfs. Current updating device tree requires space from METADATA chunk, so we -may- need to do a recursive chunk allocation when adding/updating dev extent, that is where the deadlock comes from. If we use SYSTEM metadata to update device tree, we can avoid the recursive stuff. Reported-by: Jim Schutt
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