search for: cache_block_group

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

2010 Apr 19
0
Memory barrier not required in cached_block_group
Hi all, It seems like memory barrier is not required in cached_block_group.I am looking at kernel 2.6.34-rc2. cache_block_group(struct btrfs_block_group_cache *cache) { smp_mb(); if (cache->cached != BTRFS_CACHE_NO) return 0; .... } This function is called from btrfs_alloc_logged_file_extent and find_free_extent. In btrfs_alloc_logged_file_extent the code snippet is as follows block_group = btrfs_lookup_block_grou...
2013 Aug 29
4
[PATCH] Notify caching_thread()s to give up on extent_commit_sem when needed.
caching_thread()s do all their work under read access to extent_commit_sem. They give up on this read access only when need_resched() tells them, or when they exit. As a result, somebody that wants a WRITE access to this sem, might wait for a long time. Especially this is problematic in cache_block_group(), which can be called on critical paths like find_free_extent() and in commit path via commit_cowonly_roots(). This patch is an RFC, that attempts to fix this problem, by notifying the caching threads to give up on extent_commit_sem. On a system with a lot of metadata (~20Gb total metadata, ~10G...
2008 Oct 10
1
[PATCH] fix enospc when there is plenty of space
...btrfs_block_group_cache *cache = *cache_ret; - struct btrfs_free_space *info = NULL; - u64 last; - u64 search_start = *start_ret; - - WARN_ON(!mutex_is_locked(&root->fs_info->alloc_mutex)); - if (!cache) - goto out; - - last = max(search_start, cache->key.objectid); - -again: - ret = cache_block_group(root, cache); - if (ret) - goto out; - - if (cache->ro || !block_group_bits(cache, data)) - goto new_group; - - info = btrfs_find_free_space(cache, last, num); - if (info) { - *start_ret = info->offset; - return 0; - } - -new_group: - last = cache->key.objectid + cache->key.offset;...
2009 Mar 20
1
[PATCH 2/4] Btrfs: clean up find_free_extent
...(empty_size) - extra_loop = 1; - if (!block_group) - goto new_group_no_lock; + atomic_inc(&block_group->count); + search_start = block_group->key.objectid; +have_block_group: if (unlikely(!block_group->cached)) { mutex_lock(&block_group->cache_mutex); ret = cache_block_group(root, block_group); @@ -2626,152 +2620,87 @@ static noinline int find_free_extent(struct btrfs_trans_handle *trans, } mutex_lock(&block_group->alloc_mutex); - if (unlikely(!block_group_bits(block_group, data))) - goto new_group; if (unlikely(block_group->ro)) - goto new_...
2013 Mar 15
0
[PATCH] Btrfs-progs: add skinny metadata support to progs V3
...struct btrfs_root *root, struct extent_buffer *buf, int record_parent); int btrfs_dec_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root, diff --git a/extent-tree.c b/extent-tree.c index 85f5670..eede633 100644 --- a/extent-tree.c +++ b/extent-tree.c @@ -115,7 +115,8 @@ static int cache_block_group(struct btrfs_root *root, last = max_t(u64, block_group->key.objectid, BTRFS_SUPER_INFO_OFFSET); key.objectid = last; key.offset = 0; - btrfs_set_key_type(&key, BTRFS_EXTENT_ITEM_KEY); + key.type = 0; + ret = btrfs_search_slot(NULL, root, &key, path, 0, 0); if (ret < 0) go...
2013 Feb 03
3
kernel BUG at fs/btrfs/extent-tree.c:6185!
Hi guys, my computer suddenly failed to boot. It seams that it is unable to mount /home which is btrfs. Here are the messages I get during the boot (the relevant part; hopefully): Feb 02 13:59:58 Edge kernel: kernel BUG at fs/btrfs/extent-tree.c:6185! Feb 02 13:59:58 Edge kernel: invalid opcode: 0000 [#1] PREEMPT SMP Feb 02 13:59:58 Edge kernel: Modules linked in: joydev coretemp kvm_intel kvm
2010 Nov 18
9
Interesting problem with write data.
Hi, Recently, I made a btrfs to use. And I met slowness problem. Trying to diag it. I found this: 1. dd if=/dev/zero of=test count=1024 bs=1MB This is fast, at about 25MB/s, and reasonable iowait. 2. dd if=/dev/zero of=test count=1 bs=1GB This is pretty slow, at about 1.5MB/s, and 90%+ iowait, constantly. May I know why it works like this? Thanks. -- To unsubscribe from this list: send the
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...root_objectid, owner, offset, BTRFS_DROP_DELAYED_REF, NULL); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); } return ret; } @@ -4663,7 +4663,7 @@ have_block_group: (loop > LOOP_FIND_IDEAL && atomic_read(&space_info->caching_threads) < 2)) { ret = cache_block_group(block_group); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); } found_uncached_bg = true; @@ -5088,7 +5088,7 @@ static int alloc_reserved_file_extent(struct btrfs_trans_handle *trans, path->leave_spinning = 1; ret = btrfs_insert_empty_item(trans, fs_info->extent_root, path,...