search for: clear_extent_bit

Displaying 20 results from an estimated 20 matches for "clear_extent_bit".

2011 Aug 15
9
[patch v2 0/9] btrfs: More error handling patches
Hi all - The following 9 patches add more error handling to the btrfs code: - Add btrfs_panic - Catch locking failures in {set,clear}_extent_bit - Push up set_extent_bit errors to callers - Push up lock_extent errors to callers - Push up clear_extent_bit errors to callers - Push up unlock_extent errors to callers - Make pin_down_extent return void - Push up btrfs_pin_extent errors to callers - Push up non-looped btrfs_transaction_start errors to callers Changes since version 1: - Changed BUG_ON(ret) to BUG_ON(ret < 0) in set_extent_bit push...
2013 Nov 19
6
[PATCH] Btrfs: fix very slow inode eviction and fs unmount
The inode eviction can be very slow, because during eviction we tell the VFS to truncate all of the inode''s pages. This results in calls to btrfs_invalidatepage() which in turn does calls to lock_extent_bits() and clear_extent_bit(). These calls result in too many merges and splits of extent_state structures, which consume a lot of time and cpu when the inode has many pages. In some scenarios I have experienced umount times higher than 15 minutes, even when there''s no pending IO (after a btrfs fs sync). A quick way...
2011 Sep 28
3
[PATCH] Btrfs: fix missing clear_extent_bit
...2; + EXTENT_SET_PRIVATE2; extent_clear_unlock_delalloc(inode, &BTRFS_I(inode)->io_tree, start, start + ram_size - 1, @@ -1778,6 +1778,9 @@ static int btrfs_finish_ordered_io(struct inode *inode, u64 start, u64 end) ordered_extent->len); BUG_ON(ret); } + clear_extent_bit(io_tree, ordered_extent->file_offset, + ordered_extent->file_offset + ordered_extent->len - 1, + EXTENT_DIRTY, 0, 0, &cached_state, GFP_NOFS); unlock_extent_cached(io_tree, ordered_extent->file_offset, ordered_extent->file_offset + ordered_extent->len...
2012 Feb 16
3
[PATCH 1/4] Btrfs: be less strict on finding next node in clear_extent_bit
In clear_extent_bit, it is enough that next node is adjacent in tree level. Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com> --- fs/btrfs/extent_io.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index fcf77e1..e941cc4 100644 --- a/fs/btr...
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
2010 Mar 24
1
Possible race in btrfs
...or file line fs/btrfs/inode.c 5422 btrfs_getattr+0x141/0x15e vfs_getattr+0x47/0xf4 vfs_fstatat+0x43/0x5a vfs_stat+0x16/0x18 sys_newstat+0x3d/0x75 system_call_fastpath+0x16/0x1b And for file line fs/btrfs/inode.c 1378 btrfs_clear_bit_hook+0xcc1/0x10f2 clear_state_bit+0x4db/0xa89 clear_extent_bit+0x9e1/0xc86 extent_clear_unlock_delalloc+0x8c/0x1d8 cow_file_range+0x1356/0x1432 run_delalloc_range+0x263/0x1702 __extent_writepage+0x2c4/0x15a8 extent_write_cache_pages.clone.0+0x211/0x33d extent_writepages+0x243/0x260 btrfs_writepages+0x87/0x92 do_writepages+0x1c/0x25 writeback_...
2010 Mar 03
1
[PATCH V2] Btrfs: add direct I/O helper to process inline compressed extents.
Use access_extent_buffer_page() to point at btree location of inline compressed data so it can be inflated without a memcopy. Signed-off-by: jim owens <jowens@hp.com> Signed-off-by: jim owens <jim6336@gmail.com> --- V2 fixes whitespace checkpatch warning fs/btrfs/extent_io.c | 16 ++++++++++++++++ fs/btrfs/extent_io.h | 3 +++ 2 files changed, 19 insertions(+), 0 deletions(-)
2011 Feb 11
1
null pointer dereference in iov_iter_copy_from_user_atomic while updating rpm packages
...bad_area_nosemaphore+0x17/0x19 Feb 10 10:59:45 testbox kernel: [ 524.584891] [<c07d6ef3>] ? do_page_fault+0x159/0x30c Feb 10 10:59:45 testbox kernel: [ 524.584916] [<f8225975>] ? free_extent_state+0x3c/0x3f [btrfs] Feb 10 10:59:45 testbox kernel: [ 524.584940] [<f8226053>] ? clear_extent_bit+0x31b/0x36c [btrfs] Feb 10 10:59:45 testbox kernel: [ 524.584964] [<f8225975>] ? free_extent_state+0x3c/0x3f [btrfs] Feb 10 10:59:45 testbox kernel: [ 524.584968] [<c07d6d9a>] ? do_page_fault+0x0/0x30c Feb 10 10:59:45 testbox kernel: [ 524.584971] [<c07d4b87>] ? error_code+0...
2012 Sep 17
13
[PATCH 1/2 v3] Btrfs: use flag EXTENT_DEFRAG for snapshot-aware defrag
...*tree, u64 start, u64 *start_ret, u64 *end_ret, int bits); struct extent_state *find_first_extent_bit_state(struct extent_io_tree *tree, diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 5caf285..226690a 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -1173,8 +1173,8 @@ again: clear_extent_bit(&BTRFS_I(inode)->io_tree, start_pos, last_pos - 1, EXTENT_DIRTY | EXTENT_DELALLOC | - EXTENT_DO_ACCOUNTING, 0, 0, &cached_state, - GFP_NOFS); + EXTENT_DO_ACCOUNTING | EXTENT_DEFRAG, + 0, 0, &cached_state, GFP_NOFS); unlock_extent_cached(&BTRFS_I(inod...
2008 Nov 20
0
[PATCH] btrfs: sparse lock verification annotations for wait_on_state
...dex: btrfs-unstable/fs/btrfs/extent_io.c =================================================================== --- btrfs-unstable.orig/fs/btrfs/extent_io.c 2008-11-20 19:37:10.000000000 +0100 +++ btrfs-unstable/fs/btrfs/extent_io.c 2008-11-20 19:38:44.000000000 +0100 @@ -577,6 +577,8 @@ EXPORT_SYMBOL(clear_extent_bit); static int wait_on_state(struct extent_io_tree *tree, struct extent_state *state) + __releases(tree->lock) + __acquires(tree->lock) { DEFINE_WAIT(wait); prepare_to_wait(&state->wq, &wait, TASK_UNINTERRUPTIBLE); -- To unsubscribe from this list: send the line "...
2012 Dec 12
1
kernel BUG at fs/btrfs/extent_io.c:4052 (kernel 3.5.3)
...6>] btrfs_run_delayed_refs+0x196/0x4c0 [btrfs] Dec 11 17:49:04 SANOS1 kernel: [<ffffffffa025cac8>] ? merge_state+0xd8/0x150 [btrfs] Dec 11 17:49:04 SANOS1 kernel: [<ffffffffa025c949>] ? free_extent_state+0x19/0x20 [btrfs] Dec 11 17:49:04 SANOS1 kernel: [<ffffffffa025d476>] ? clear_extent_bit+0x216/0x380 [btrfs] Dec 11 17:49:04 SANOS1 kernel: [<ffffffffa023d56a>] __btrfs_end_transaction+0x9a/0x350 [btrfs] Dec 11 17:49:04 SANOS1 kernel: [<ffffffffa023d880>] btrfs_end_transaction+0x10/0x20 [btrfs] Dec 11 17:49:04 SANOS1 kernel: [<ffffffffa02433c5>] btrfs_finish_ordere...
2010 Jul 29
1
[Bug] check return of kmalloc()
...ent(str { struct async_extent *async_extent; - async_extent = kmalloc(sizeof(*async_extent), GFP_NOFS); async_extent->start = start; async_extent->ram_size = ram_size; async_extent->compressed_size = compressed_size; @@ -940,7 +939,6 @@ static int cow_file_range_async(struct i clear_extent_bit(&BTRFS_I(inode)->io_tree, start, end, EXTENT_LOCKED, 1, 0, NULL, GFP_NOFS); while (start < end) { - async_cow = kmalloc(sizeof(*async_cow), GFP_NOFS); async_cow->inode = inode; async_cow->root = root; async_cow->locked_page = locked_page; @@ -4891,7 +4888,6 @@ st...
2013 Aug 04
2
Unable to unmount filesystem (bug in kernel reported in kern.log)
...4 02:26:06 rohan kernel: [ 3878.951105] [<ffffffffa05237a5>] extent_writepages+0x45/0x60 [btrfs] Aug 4 02:26:06 rohan kernel: [ 3878.951105] [<ffffffffa05085d0>] ? btrfs_read_locked_inode+0x390/0x390 [btrfs] Aug 4 02:26:06 rohan kernel: [ 3878.951105] [<ffffffffa051fade>] ? clear_extent_bit+0x1ce/0x3f0 [btrfs] Aug 4 02:26:06 rohan kernel: [ 3878.951105] [<ffffffffa0506ff8>] btrfs_writepages+0x28/0x30 [btrfs] Aug 4 02:26:06 rohan kernel: [ 3878.951105] [<ffffffff811245c1>] do_writepages+0x21/0x40 Aug 4 02:26:06 rohan kernel: [ 3878.951105] [<ffffffff8111a8bb>] _...
2013 Oct 25
0
[PATCH] Btrfs: return an error from btrfs_wait_ordered_range
...ree-space-cache.c +++ b/fs/btrfs/free-space-cache.c @@ -1010,8 +1010,13 @@ static int __btrfs_write_out_cache(struct btrfs_root *root, struct inode *inode, if (ret) goto out; - - btrfs_wait_ordered_range(inode, 0, (u64)-1); + ret = btrfs_wait_ordered_range(inode, 0, (u64)-1); + if (ret) { + clear_extent_bit(&BTRFS_I(inode)->io_tree, 0, inode->i_size - 1, + EXTENT_DIRTY | EXTENT_DELALLOC, 0, 0, NULL, + GFP_NOFS); + goto out; + } key.objectid = BTRFS_FREE_SPACE_OBJECTID; key.offset = offset; diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index ef08cbd..961ae6f 100644 --- a/fs/...
2013 Oct 09
2
[PATCH] Btrfs: add tests for find_lock_delalloc_range
...t;, + test_start, test_start + PAGE_CACHE_SIZE - 1, start, + end); + goto out_bits; + } + if (process_page_range(inode, start, end, PROCESS_TEST_LOCKED | + PROCESS_UNLOCK)) { + test_msg("Pages in range were not all locked\n"); + goto out_bits; + } + ret = 0; +out_bits: + clear_extent_bits(&tmp, 0, total_dirty - 1, + (unsigned long)-1, GFP_NOFS); +out: + if (locked_page) + page_cache_release(locked_page); + process_page_range(inode, 0, total_dirty - 1, + PROCESS_UNLOCK | PROCESS_RELEASE); + iput(inode); + return ret; +} + +int btrfs_test_extent_io(void) +{ + test_msg(&...
2009 May 12
0
[PATCH 1/2] btrfs-progs: mixed back ref support
...hile(1) { @@ -1364,45 +1498,18 @@ static int finish_current_insert(struct key.objectid = start; key.offset = end + 1 - start; key.type = BTRFS_EXTENT_ITEM_KEY; - err = btrfs_insert_item(trans, extent_root, &key, - &extent_item, sizeof(extent_item)); - BUG_ON(err); - - clear_extent_bits(&info->extent_ins, start, end, - EXTENT_LOCKED, GFP_NOFS); - - err = insert_extent_backref(trans, extent_root, path, - start, extent_op->parent, + ret = alloc_reserved_tree_block(trans, extent_root, extent_root->root_key.objectid, - extent_op->generation,...
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
2013 Apr 03
0
[PATCH] Btrfs-progs: add a free space cache checker to fsck
...k_group_cache, start, &ptr); - if (!ret) - kfree((void *)(unsigned long)ptr); + if (!ret) { + cache = (struct btrfs_block_group_cache *)ptr; + if (cache->free_space_ctl) { + btrfs_remove_free_space_cache(cache); + kfree(cache->free_space_ctl); + } + kfree(cache); + } clear_extent_bits(&info->block_group_cache, start, end, (unsigned int)-1, GFP_NOFS); } diff --git a/extent_io.c b/extent_io.c index 78deb50..5093aeb 100644 --- a/extent_io.c +++ b/extent_io.c @@ -27,6 +27,8 @@ #include "kerncompat.h" #include "extent_io.h" #include "list....
2011 Jul 21
10
[PATCH v5 0/8] Btrfs scrub: print path to corrupted files and trigger nodatasum fixup
While testing raid-auto-repair patches I''m going to send out later, I just found the very last bug in my current scrub patch series: Changelog v4->v5: - fixed a deadlock when fixup is taking longer while scrub is about to end Original message follows: ------------------------ This patch set introduces two new features for scrub. They share the backref iteration code which is the
2012 Apr 20
44
Ceph on btrfs 3.4rc
After running ceph on XFS for some time, I decided to try btrfs again. Performance with the current "for-linux-min" branch and big metadata is much better. The only problem (?) I''m still seeing is a warning that seems to occur from time to time: [87703.784552] ------------[ cut here ]------------ [87703.789759] WARNING: at fs/btrfs/inode.c:2103