search for: btrfs_tree_lock

Displaying 11 results from an estimated 11 matches for "btrfs_tree_lock".

2013 Oct 07
0
[PATCH] Btrfs: cleanup reserved space when freeing tree log on error
...5 insertions(+), 22 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 964c583..849b729 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -2151,11 +2151,13 @@ static noinline int walk_down_log_tree(struct btrfs_trans_handle *trans, return ret; } - btrfs_tree_lock(next); - btrfs_set_lock_blocking(next); - clean_tree_block(trans, root, next); - btrfs_wait_tree_block_writeback(next); - btrfs_tree_unlock(next); + if (trans) { + btrfs_tree_lock(next); + btrfs_set_lock_blocking(next); + clean_tree_block(trans, root, next); + btrfs_w...
2008 Sep 08
17
btrfs_tree_lock & trylock
I did some btrfs RTFS over the weeking and I have a hard time understanding what this code is attempting to do: 28 int btrfs_tree_lock(struct extent_buffer *eb) 29 { 30 int i; 31 32 if (mutex_trylock(&eb->mutex)) 33 return 0; 34 for (i = 0; i < 512; i++) { 35 cpu_relax(); 36 if (mutex_trylock(&eb->mutex)) 37 r...
2012 Sep 12
2
Deadlock in btrfs-cleaner, related to snapshot deletion
...00000000013dc0 [ 386.318213] ffffffff81c14440 ffff88040b3496d0 ffff88040c34b6b0 ffff880405a04408 [ 386.318220] Call Trace: [ 386.318236] [<ffffffff81139f03>] ? activate_page+0x83/0xa0 [ 386.318245] [<ffffffff8169d0e9>] schedule+0x29/0x70 [ 386.318305] [<ffffffffa011b29d>] btrfs_tree_lock+0xcd/0x250 [btrfs] [ 386.318314] [<ffffffff8107ccd0>] ? add_wait_queue+0x60/0x60 [ 386.318348] [<ffffffffa00dc4f8>] btrfs_init_new_buffer+0x68/0x140 [btrfs] [ 386.318379] [<ffffffffa00dc66f>] btrfs_alloc_free_block+0x9f/0x220 [btrfs] [ 386.318408] [<ffffffffa00c83b2>...
2009 Jul 07
0
[PATCH] speed up snapshot dropping
...generation <= root->root_key.offset) + return 1; + + bytenr = btrfs_node_blockptr(path->nodes[level], path->slots[level]); + blocksize = btrfs_level_size(root, level - 1); + + if (wc->stage == DROP_REFERENCE) { + next = btrfs_find_create_tree_block(root, bytenr, blocksize); + btrfs_tree_lock(next); + btrfs_set_lock_blocking(next); + + ret = btrfs_lookup_extent_info(trans, root, bytenr, blocksize, + &wc->refs[level - 1], + &wc->flags[level - 1]); + BUG_ON(ret); + BUG_ON(wc->refs[level - 1] == 0); + + if (wc->refs[level - 1] > 1) { + if...
2013 Aug 27
7
[PATCH] Btrfs: fix deadlock in uuid scan kthread
...[36700.671668] ffff880807815c40 ffff880248cbffd8 ffff880248cbffd8 ffff880248cbffd8 [36700.671669] ffff8805e86a0000 ffff880807815c40 ffff880248cbf4d8 ffff8801dbd5c280 [36700.671670] Call Trace: [36700.671672] [<ffffffff816f36b9>] schedule+0x29/0x70 [36700.671679] [<ffffffffa05d9b0d>] btrfs_tree_lock+0x6d/0x230 [btrfs] [36700.671680] [<ffffffff81066760>] ? add_wait_queue+0x60/0x60 [36700.671685] [<ffffffffa0582829>] btrfs_search_slot+0x999/0xb00 [btrfs] [36700.671691] [<ffffffffa05bd9de>] ? btrfs_lookup_first_ordered_extent+0x5e/0xb0 [btrfs] [36700.671698] [<ffffffffa05...
2011 Aug 26
0
[PATCH] Btrfs: make some functions return void
.../btrfs/locking.c b/fs/btrfs/locking.c index d77b67c..77d5bbd 100644 --- a/fs/btrfs/locking.c +++ b/fs/btrfs/locking.c @@ -160,7 +160,7 @@ void btrfs_tree_read_unlock_blocking(struct extent_buffer *eb) * take a spinning write lock. This will wait for both * blocking readers or writers */ -int btrfs_tree_lock(struct extent_buffer *eb) +void btrfs_tree_lock(struct extent_buffer *eb) { again: wait_event(eb->read_lock_wq, atomic_read(&eb->blocking_readers) == 0); @@ -181,7 +181,6 @@ again: WARN_ON(atomic_read(&eb->spinning_writers)); atomic_inc(&eb->spinning_writers); atom...
2011 Sep 10
12
WARNING: at fs/btrfs/inode.c:2193 btrfs_orphan_commit_root+0xb0/0xc0 [btrfs]()
Hi I am hitting this Warning reproducible, the workload is a ceph osd, kernel ist 3.1.0-rc5. Best Regards, martin [ 5472.099766] ------------[ cut here ]------------ [ 5472.099833] WARNING: at fs/btrfs/inode.c:2193 btrfs_orphan_commit_root+0xb0/0xc0 [btrfs]() [ 5472.099838] Hardware name: MS-96B3 [ 5472.099842] Modules linked in: radeon ttm drm_kms_helper drm i2c_algo_bit psmouse sp5100_tco
2012 Jun 21
0
[RFC PATCH V2] Btrfs: introduce extent buffer cache for each i-node
...goto done; @@ -2555,13 +2525,13 @@ cow_done: if (!p->skip_locking) { level = btrfs_header_level(b); - if (level <= write_lock_level) { + if (level <= *write_lock_level) { err = btrfs_try_tree_write_lock(b); if (!err) { btrfs_set_path_blocking(p); btrfs_tree_lock(b); btrfs_clear_path_blocking(p, b, - BTRFS_WRITE_LOCK); + BTRFS_WRITE_LOCK); } p->locks[level] = BTRFS_WRITE_LOCK; } else { @@ -2570,7 +2540,7 @@ cow_done: btrfs_set_path_blocking(p); btrfs_tree_read_lock(b); btrfs_clear_path_blocking(...
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
2011 Oct 06
26
[PATCH v0 00/18] btfs: Subvolume Quota Groups
This is a first draft of a subvolume quota implementation. It is possible to limit subvolumes and any group of subvolumes and also to track the amount of space that will get freed when deleting snapshots. The current version is functionally incomplete, with the main missing feature being the initial scan and rescan of an existing filesystem. I put some effort into writing an introduction into
2011 Jun 21
19
[GIT PULL v3] Btrfs: improve write ahead log with sub transaction
I''ve been working to try to improve the write-ahead log''s performance, and I found that the bottleneck addresses in the checksum items, especially when we want to make a random write on a large file, e.g a 4G file. Then a idea for this suggested by Chris is to use sub transaction ids and just to log the part of inode that had changed since either the last log commit or the last