search for: tree_search_offset

Displaying 8 results from an estimated 8 matches for "tree_search_offset".

2009 Jul 31
1
[PATCH] Btrfs: make sure we find a bitmap entry
...ve some free space but failed because we couldn''t find the free space entry. This is because the free space was held within a bitmap that had a starting offset well before the actual offset of the free space, and there were free space extents that were in the same range as that offset, so tree_search_offset returned with NULL because we couldn''t find a free space extent that had that offset. This is fixed by making sure that if we fail to find the entry, we re-search again with bitmap_only set to 1 and do an offset_to_bitmap so we can get the appropriate bitmap. A similar problem happens in...
2011 Sep 27
2
high CPU usage and low perf
...i R running task 0 963 2 0x00000000 ffff880143af7730 ffffffff00000001 ffffffffffffff10 ffff880143af77b0 ffff8801456da420 ffffffffffffffff 00000000e86aa840 0000000000001000 00000000ffffffe4 ffff8801462ba800 ffff880109f9b540 000088002a95eba8 Call Trace: [<ffffffffa032765e>] ? tree_search_offset+0x18f/0x1b8 [btrfs] [<ffffffffa02eb745>] ? btrfs_reserve_extent+0xb0/0x190 [btrfs] [<ffffffffa02ebdfc>] ? btrfs_alloc_free_block+0x22e/0x349 [btrfs] [<ffffffffa02dea3d>] ? __btrfs_cow_block+0x102/0x31e [btrfs] [<ffffffffa02ebdfc>] ? btrfs_alloc_free_block+0x22e/0x349 [bt...
2013 Mar 15
0
[PATCH] Btrfs: add some free space cache tests
...in the + * range at all we will return 1. + */ +static int check_exists(struct btrfs_block_group_cache *cache, u64 offset, + u64 bytes) +{ + struct btrfs_free_space_ctl *ctl = cache->free_space_ctl; + struct btrfs_free_space *info; + int ret = 0; + + spin_lock(&ctl->tree_lock); + info = tree_search_offset(ctl, offset, 0, 0); + if (!info) { + info = tree_search_offset(ctl, offset_to_bitmap(ctl, offset), + 1, 0); + if (!info) + goto out; + } + +have_info: + if (info->bitmap) { + u64 bit_off, bit_bytes; + struct rb_node *n; + struct btrfs_free_space *tmp; + + bit_off = offset; + bit_b...
2011 May 25
0
[PATCH] Btrfs: cache bitmaps when searching for a cluster
...re. + */ + if (!list_empty(bitmaps)) { + entry = list_entry(bitmaps->prev, struct btrfs_free_space, + list); + node = rb_next(&entry->offset_index); + if (!node) + return -ENOSPC; + entry = rb_entry(node, struct btrfs_free_space, offset_index); + goto search; + } + entry = tree_search_offset(block_group, offset_to_bitmap(block_group, offset), 0, 1); if (!entry) return -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...
2013 Apr 03
0
[PATCH] Btrfs-progs: add a free space cache checker to fsck
...r(node, root); + + return 0; +} + +/* + * searches the tree for the given offset. + * + * fuzzy - If this is set, then we are trying to make an allocation, and we just + * want a section that has at least bytes size and comes at or after the given + * offset. + */ +static struct btrfs_free_space * +tree_search_offset(struct btrfs_free_space_ctl *ctl, + u64 offset, int bitmap_only, int fuzzy) +{ + struct rb_node *n = ctl->free_space_offset.rb_node; + struct btrfs_free_space *entry, *prev = NULL; + + /* find entry that is closest to the ''offset'' */ + while (1) { + if (!n) { + entry = N...
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
2012 Jan 11
12
[PATCH 00/11] Btrfs: some patches for 3.3
The biggest one is a fix for fstrim, and there''s a fix for on-disk free space cache. Others are small fixes and cleanups. The last three have been sent weeks ago. The patchset is also available in this repo: git://repo.or.cz/linux-btrfs-devel.git for-chris Note there''s a small confict with Al Viro''s vfs changes. Li Zefan (11): Btrfs: add pinned extents to
2011 Mar 09
0
Re: "open_ctree failed", unable to mount the fs
...8800cac3b0f0 ffff8800377d9ea0 Mar  9 23:59:47 ftp2 kernel: [121691.704284] Call Trace: Mar  9 23:59:47 ftp2 kernel: [121691.704297]  [] ? run_clustered_refs+0x667/0x771 [btrfs] Mar  9 23:59:47 ftp2 kernel: [121691.704304]  [] ? schedule+0x6ff/0x79d Mar  9 23:59:47 ftp2 kernel: [121691.704315]  [] ? tree_search_offset+0x128/0x1ab [btrfs] Mar  9 23:59:47 ftp2 kernel: [121691.704328]  [] ? btrfs_run_delayed_refs+0xcd/0x1c0 [btrfs] Mar  9 23:59:47 ftp2 kernel: [121691.704343]  [] ? btrfs_commit_transaction+0x7e/0x61e [btrfs] Mar  9 23:59:47 ftp2 kernel: [121691.704349]  [] ? autoremove_wake_function+0x0/0x2a Mar  9...