Displaying 20 results from an estimated 25 matches for "cow_file_rang".
Did you mean:
cow_file_range
2012 Nov 01
0
[PATCH 1/5] Btrfs: fix joining the same transaction handler more than 2 times
...inodes with pending delalloc in a transaction, we may join
the same transaction handler more than 2 times.
The reason is:
Task use_count of trans handle
commit_transaction 1
|-> btrfs_start_delalloc_inodes 1
|-> run_delalloc_nocow 1
|-> join_transaction 2
|-> cow_file_range 2
|-> join_transaction 3
In fact, cow_file_range needn''t join the transaction again because the caller
have joined the transaction, so we fix this problem by this way.
Reported-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
---
fs/bt...
2010 Mar 24
1
Possible race in btrfs
...attr+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_single_inode+0xe2/0x24c
writeback_inodes_wb+0x374/0x48d
wb_writeba...
2012 Aug 14
2
Hung I/O, Kernel BUG with corrupt leaf (bad key order)
...2 mbcache uhci_hcd ehci_hcd usbcore
usb_common sd_mod ahci libahci pata_marvell libata scsi_mod
[ 153.913685]
[ 153.913698] Pid: 325, comm: btrfs-transacti Tainted: G C
3.4.8-1-ARCH #1 /DG33TL
[ 153.913767] RIP: 0010:[<ffffffffa0197cd0>] [<ffffffffa0197cd0>]
cow_file_range+0x3d0/0x4b0 [btrfs]
[ 153.913841] RSP: 0018:ffff8801a1fb1580 EFLAGS: 00010246
[ 153.913873] RAX: ffff88019cd38000 RBX: ffff8801a1fb18e8 RCX: 000000000000ffff
[ 153.913911] RDX: ffff88019d8bb800 RSI: ffffea00060d0040 RDI: ffff88017dff47f0
[ 153.913951] RBP: ffff8801a1fb1640 R08: ffff8801a1fb18...
2011 Feb 12
3
[PATCH] fix uncheck memory allocations
...;
@@ -644,6 +646,7 @@ retry:
async_extent->ram_size - 1, 0);
em = alloc_extent_map(GFP_NOFS);
+ BUG_ON(!em || IS_ERR(em));
em->start = async_extent->start;
em->len = async_extent->ram_size;
em->orig_start = em->start;
@@ -820,6 +823,7 @@ static noinline int cow_file_range(struct inode *inode,
BUG_ON(ret);
em = alloc_extent_map(GFP_NOFS);
+ BUG_ON(!em || IS_ERR(em));
em->start = start;
em->orig_start = em->start;
ram_size = ins.offset;
@@ -1169,6 +1173,7 @@ out_check:
struct extent_map_tree *em_tree;
em_tree = &BTRFS_I(inode)-&...
2008 Oct 27
0
[PATCH 3/4] update nodatacow code
...cow_start = cur_offset;
+ cur_offset = extent_end;
+ if (cur_offset > end)
+ break;
+ path->slots[0]++;
+ goto next_slot;
}
btrfs_release_path(root, path);
- start = extent_end;
- if (start <= end) {
- loops++;
- goto again;
+ if (cow_start != (u64)-1) {
+ ret = cow_file_range(inode, cow_start,
+ found_key.offset - 1);
+ BUG_ON(ret);
+ cow_start = (u64)-1;
}
- } else {
-not_found:
- btrfs_end_transaction(trans, root);
- btrfs_free_path(path);
- return cow_file_range(inode, start, end);
+
+ disk_bytenr += cur_offset - found_key.offset;
+ ret = btrfs_...
2008 Apr 10
1
fsfuzz testing: some results
...0 f2455730 f288c400 00000000 000002f4 00000000 07b45000 00000000
0000394d 00000246 f7945c64 c041fec6 42a9fd92 00000172 027f9000 00000000
00000000 f7945d10 f8b9a246 027f9000 00000000 00000003 00000000 00000671
Call Trace:
[<c041fec6>] ? hrtick_set+0xcf/0xd7
[<f8b9a246>] ? cow_file_range+0x15f/0x243 [btrfs]
[<f8b9a89f>] ? run_delalloc_range+0x294/0x2b5 [btrfs]
[<f8ba622b>] ? unlock_extent+0x17/0x19 [btrfs]
[<f8ba69ed>] ? __extent_writepage+0x1a0/0x62d [btrfs]
[<c0456f41>] ? write_cache_pages+0x180/0x287
[<f8ba684d>] ? __extent_writepage+0x0/0x62d...
2013 Aug 04
2
Unable to unmount filesystem (bug in kernel reported in kern.log)
....947556]
Aug 4 02:26:06 rohan kernel: [ 3878.947566] Pid: 4629, comm:
btrfs-transacti Tainted: G O 3.2.0-51-generic #77-Ubuntu
System manufacturer System Product Name/P5KPL-AM SE
Aug 4 02:26:06 rohan kernel: [ 3878.947628] RIP:
0010:[<ffffffffa050c538>] [<ffffffffa050c538>]
cow_file_range+0x388/0x3a0 [btrfs]
Aug 4 02:26:06 rohan kernel: [ 3878.947687] RSP:
0018:ffff880061bfd6a0 EFLAGS: 00010246
Aug 4 02:26:06 rohan kernel: [ 3878.947712] RAX: ffff8800d8ede000
RBX: 0000000000000000 RCX: 000000000000ffff
Aug 4 02:26:06 rohan kernel: [ 3878.947743] RDX: ffff8800d6fcf000
RSI: ffffe...
2011 Feb 09
1
warning in btrfs_free_block_groups
I suspect this might be related to previous btrfs errors I''ve had on
the same filesystem. See:
http://python.ca/nas/linux/btrfs_bug.txt
The most recent kernel message is:
WARNING: at fs/btrfs/extent-tree.c:8239 btrfs_free_block_groups+0x218/0x275()
Hardware name: MS-7388
Modules linked in: udf crc_itu_t isofs loop nls_iso8859_1 vboxnetflt vboxdrv nls_utf8 nls_cp437
2013 Oct 25
0
[PATCH] Btrfs: do not bug_on if we try to cow a free space cache inode
...gned-off-by: Josef Bacik <jbacik@fusionio.com>
---
fs/btrfs/inode.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 961ae6f..db6e11f 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -843,7 +843,10 @@ static noinline int cow_file_range(struct inode *inode,
struct extent_map_tree *em_tree = &BTRFS_I(inode)->extent_tree;
int ret = 0;
- BUG_ON(btrfs_is_free_space_inode(inode));
+ if (btrfs_is_free_space_inode(inode)) {
+ WARN_ON_ONCE(1);
+ return -EINVAL;
+ }
num_bytes = ALIGN(end - start + 1, blocksize);
num_b...
2011 Sep 28
3
[PATCH] Btrfs: fix missing clear_extent_bit
....c
@@ -1150,7 +1150,6 @@ fail:
faili--;
}
return err;
-
}
static noinline ssize_t __btrfs_buffered_write(struct file *file,
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 0ccc743..d42bea4 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -882,7 +882,7 @@ static noinline int cow_file_range(struct inode *inode,
*/
op = unlock ? EXTENT_CLEAR_UNLOCK_PAGE : 0;
op |= EXTENT_CLEAR_UNLOCK | EXTENT_CLEAR_DELALLOC |
- EXTENT_SET_PRIVATE2;
+ EXTENT_SET_PRIVATE2;
extent_clear_unlock_delalloc(inode, &BTRFS_I(inode)->io_tree,
start, start + ram_size - 1,...
2008 Sep 01
2
Transparent compression for Btrfs
Hi,
For a medium term project, I''m thinking of working on transparent compression
for Btrfs. Please give any hints and comments on how we would want to go
about this, the features we would like to have and some common pitfalls to
avoid.
Is looking at how it''s done in Reiser4, a good idea ? Can we allow the
compression algorithm be configurable on a per file basis, may be
2012 Jun 11
0
[PATCH] Btrfs: call filemap_fdatawrite twice for compression V2
...amp;
- !(BTRFS_I(inode)->force_compress) &&
- !(BTRFS_I(inode)->flags & BTRFS_INODE_COMPRESS))
+ } else if (!btrfs_test_opt(root, COMPRESS) &&
+ !(BTRFS_I(inode)->force_compress) &&
+ !(BTRFS_I(inode)->flags & BTRFS_INODE_COMPRESS)) {
ret = cow_file_range(inode, locked_page, start, end,
page_started, nr_written, 1);
- else
+ } else {
+ set_bit(BTRFS_INODE_HAS_ASYNC_EXTENT,
+ &BTRFS_I(inode)->runtime_flags);
ret = cow_file_range_async(inode, locked_page, start, end,
page_started, nr_written);
+ }
return ret;
}
d...
2011 Sep 05
1
Error on creating snapshots (btrfs: could not do orphan cleanup -116)
This happens on a freshly created btrfs filesystem in a raid10 (4x1TB)
configuration with three
subvolumes and 1.5 TB data.
When I try to snapshot one of the subvolumes (with 100 GB of data), it
says that the snapshot
creation failed and I get the following error message:
btrfs: could not do orphan cleanup -116
After the failure:
- The snapshot exists in `btrfs subvolume list''
- The
2008 Nov 13
7
Kernel oops when running bonnie++ on btrfs
...00001000 00000000 dee450a0 df61c000 ^M
Nov 12 22:39:13 Intrepid-btrfs kernel: [ 2531.816012] Call Trace:^M
Nov 12 22:39:13 Intrepid-btrfs kernel: [ 2531.816012] [<e08d2ea7>] ?
btrfs_reserve_extent+0x77/0xb0 [btrfs]^M
Nov 12 22:39:13 Intrepid-btrfs kernel: [ 2531.816012] [<e08de767>] ?
cow_file_range+0x227/0x4d0 [btrfs]^M
Nov 12 22:39:13 Intrepid-btrfs kernel: [ 2531.816012] [<e08dee68>] ?
submit_compressed_extents+0x458/0x4d0 [btrfs]^M
Nov 12 22:39:13 Intrepid-btrfs kernel: [ 2531.816012] [<c01284cb>] ?
finish_task_switch+0x2b/0xe0^M
Nov 12 22:39:13 Intrepid-btrfs kernel: [ 2531...
2012 Jan 05
4
[RFC][PATCH 3/3] Btrfs: improve truncation of btrfs
...gt; S_SHIFT] = {
};
static int btrfs_setsize(struct inode *inode, loff_t newsize);
-static int btrfs_truncate(struct inode *inode);
+static int btrfs_truncate(struct inode *inode, loff_t newsize);
static int btrfs_finish_ordered_io(struct inode *inode, u64 start, u64 end);
static noinline int cow_file_range(struct inode *inode,
struct page *locked_page,
@@ -2230,7 +2230,7 @@ int btrfs_orphan_cleanup(struct btrfs_root *root)
* btrfs_delalloc_reserve_space to catch offenders.
*/
mutex_lock(&inode->i_mutex);
- ret = btrfs_truncate(inode);
+ ret = btrfs_truncate(inode, in...
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...nt insert_inline_extent(struct btrfs_trans_handle *trans,
inode_add_bytes(inode, size);
ret = btrfs_insert_empty_item(trans, root, path, &key,
datasize);
- BUG_ON(ret);
+ btrfs_fixable_bug_on(ret);
if (ret) {
err = ret;
goto fail;
@@ -244,14 +244,14 @@ static noinline int cow_file_range_inline(struct btrfs_trans_handle *trans,
ret = btrfs_drop_extents(trans, inode, start, aligned_end,
&hint_byte, 1);
- BUG_ON(ret);
+ btrfs_fixable_bug_on(ret);
if (isize > actual_end)
inline_len = min_t(u64, isize, actual_end);
ret = insert_inline_extent(trans, root, inod...
2012 Aug 24
4
[PATCH] Btrfs: pass lockdep rwsem metadata to async commit transaction
The freeze rwsem is taken by sb_start_intwrite() and dropped during the
commit_ or end_transaction(). In the async case, that happens in a worker
thread. Tell lockdep the calling thread is releasing ownership of the
rwsem and the async thread is picking it up.
Josef and I worked out a more complicated solution that made the async
commit thread join and potentially get a later transaction, but
2009 Aug 24
0
[PATCH] Btrfs: proper metadata -ENOSPC handling
...de.c
+++ b/fs/btrfs/inode.c
@@ -400,7 +400,7 @@ again:
}
if (start == 0) {
trans = btrfs_join_transaction(root, 1);
- BUG_ON(!trans);
+ BUG_ON(IS_ERR(trans));
btrfs_set_trans_block_group(trans, inode);
/* lets try to make an inline extent */
@@ -695,8 +695,12 @@ static noinline int cow_file_range(struct inode *inode,
struct extent_map_tree *em_tree = &BTRFS_I(inode)->extent_tree;
int ret = 0;
- trans = btrfs_join_transaction(root, 1);
- BUG_ON(!trans);
+ /*
+ * 1 for the inode
+ * 1 for the extent we have to insert
+ */
+ trans = btrfs_join_transaction(root, 2);
+ BUG_ON(IS...
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
2011 May 11
8
[PATCH 1/4] Btrfs: map the node block when looking for readahead targets
If we have particularly full nodes, we could call btrfs_node_blockptr up to 32
times, which is 32 pairs of kmap/kunmap, which _sucks_. So go ahead and map the
extent buffer while we look for readahead targets. Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com>
---
fs/btrfs/ctree.c | 23 +++++++++++++++++++++--
1 files changed, 21 insertions(+), 2 deletions(-)
diff --git