search for: btrfs_truncat

Displaying 13 results from an estimated 13 matches for "btrfs_truncat".

Did you mean: btrfs_truncate
2010 Nov 19
1
Btrfs_truncate ?
...pkr ide_core serio_raw ext4 mbcache jbd2 crc16 btrfs zlib_deflate sd_mod crc_t10dif ata_generic ata_piix libata scsi_mod [69003.807987] [69003.807987] Pid: 1666, comm: cosd Not tainted 2.6.37-rc1+ #1 X7SBi-LN4/X7SBi-LN4 [69003.807987] RIP: 0010:[<ffffffffa015250e>] [<ffffffffa015250e>] btrfs_truncate+0x447/0x47c [btrfs] [69003.807987] RSP: 0018:ffff880127723d68 EFLAGS: 00010286 [69003.807987] RAX: 00000000ffffffe4 RBX: ffff880127b11848 RCX: ffff88012bab8bd0 [69003.807987] RDX: 0000000000000000 RSI: ffffea000418d840 RDI: 0000000000000206 [69003.807987] RBP: ffff880127910900 R08: 00000000000001...
2012 Jan 05
4
[RFC][PATCH 3/3] Btrfs: improve truncation of btrfs
...s(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index df6060f..9ace01b 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -88,7 +88,7 @@ static unsigned char btrfs_type_by_mode[S_IFMT >> 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_cle...
2011 Jun 09
2
[PATCH] Btrfs: turn to readonly if btrfs_start_transaction() fails
...1 for xattr if selinux is on */ trans = btrfs_start_transaction(root, 5); - if (IS_ERR(trans)) + if (IS_ERR(trans)) { + btrfs_abort_transaction(root, PTR_ERR(trans)); return PTR_ERR(trans); + } err = btrfs_find_free_ino(root, &objectid); if (err) @@ -6542,6 +6555,7 @@ static int btrfs_truncate(struct inode *inode) trans = btrfs_start_transaction(root, 4); if (IS_ERR(trans)) { err = PTR_ERR(trans); + btrfs_abort_transaction(root, err); goto out; } @@ -6569,6 +6583,7 @@ static int btrfs_truncate(struct inode *inode) trans = btrfs_start_transaction(root, 1); if (IS_ERR(t...
2011 Aug 08
0
[PATCH] Btrfs: fix how we reserve space for deleting inodes
I converted btrfs_truncate to do sane reservations for truncate, but didn''t convert btrfs_evict_inode. Basically we need to save the orphan_rsv for deleting the orphan item, and do normal reservations for our truncate. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com> --- fs/btrfs/inode.c | 31 +++++...
2013 Feb 07
1
[PATCH] Btrfs: cleanup orphan reservation if truncate fails
.../btrfs/inode.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 73e9409..905297f 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -2538,6 +2538,8 @@ int btrfs_orphan_cleanup(struct btrfs_root *root) goto out; ret = btrfs_truncate(inode); + if (ret) + btrfs_orphan_del(NULL, inode); } else { nr_unlink++; } -- 1.7.7.6 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo...
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
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
2013 Oct 25
0
[PATCH] Btrfs: return an error from btrfs_wait_ordered_range
...ruct kiocb *iocb, * outstanding dirty pages are on disk. */ count = iov_length(iov, nr_segs); - btrfs_wait_ordered_range(inode, offset, count); + ret = btrfs_wait_ordered_range(inode, offset, count); + if (ret) + return ret; if (rw & WRITE) { /* @@ -7595,7 +7597,10 @@ static int btrfs_truncate(struct inode *inode) u64 mask = root->sectorsize - 1; u64 min_size = btrfs_calc_trunc_metadata_size(root, 1); - btrfs_wait_ordered_range(inode, inode->i_size & (~mask), (u64)-1); + ret = btrfs_wait_ordered_range(inode, inode->i_size & (~mask), + (u64)-1); + if (ret...
2011 Nov 09
12
WARNING: at fs/btrfs/inode.c:2198 btrfs_orphan_commit_root+0xa8/0xc0
Hello, I''m seeing a lot of warnings in dmesg with a BTRFS filesystem. I''m using the 3.1 kernel, I found a patch for these warnings ( http://marc.info/?l=linux-btrfs&m=131547325515336&w=2) <http://marc.info/?l=linux-btrfs&m=131547325515336&w=2>, but that patch has already been included in 3.1. Are there any other patches I can try? I''m using
2009 Aug 24
0
[PATCH] Btrfs: proper metadata -ENOSPC handling
...ir, struct dentry *dentry) return -ENOTEMPTY; } + /* 1 for the orphan item */ trans = btrfs_start_transaction(root, 1); + if (IS_ERR(trans)) + return PTR_ERR(trans); + btrfs_set_trans_block_group(trans, dir); err = btrfs_orphan_add(trans, inode); @@ -2610,12 +2634,15 @@ noinline int btrfs_truncate_inode_items(struct btrfs_trans_handle *trans, BUG_ON(!path); path->reada = -1; - /* FIXME, add redo link to tree so we don''t leak on crash */ key.objectid = inode->i_ino; key.offset = (u64)-1; key.type = (u8)-1; search_again: + ret = btrfs_extend_transaction(trans, ro...
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...ret); + btrfs_fixable_bug_on(ret); ei = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_item); refs = btrfs_extent_refs(leaf, ei); @@ -1619,7 +1619,7 @@ int update_inline_extent_backref(struct btrfs_trans_handle *trans, end - ptr - size); item_size -= size; ret = btrfs_truncate_item(trans, root, path, item_size, 1); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); } btrfs_mark_buffer_dirty(leaf); return 0; @@ -1801,7 +1801,7 @@ static int __btrfs_inc_extent_ref(struct btrfs_trans_handle *trans, ret = insert_extent_backref(trans, root->fs_info->extent_root,...
2013 Aug 19
11
[RFC PATCH] Btrfs: fix memory leak of orphan block rsv
...+ root->orphan_block_rsv = NULL; + } else { + rsv = NULL; + } + spin_unlock(&root->orphan_lock); + + if (rsv) { + WARN_ON(rsv->size > 0); + btrfs_free_block_rsv(root, rsv); + } + btrfs_remove_delayed_node(inode); clear_inode(inode); return; @@ -7650,7 +7673,6 @@ static int btrfs_truncate(struct inode *inode) } if (ret == 0 && inode->i_nlink > 0) { - trans->block_rsv = root->orphan_block_rsv; ret = btrfs_orphan_del(trans, inode); if (ret) err = ret; -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs"...
2012 Dec 13
22
[PATCH] Btrfs: fix a deadlock on chunk mutex
An user reported that he has hit an annoying deadlock while playing with ceph based on btrfs. Current updating device tree requires space from METADATA chunk, so we -may- need to do a recursive chunk allocation when adding/updating dev extent, that is where the deadlock comes from. If we use SYSTEM metadata to update device tree, we can avoid the recursive stuff. Reported-by: Jim Schutt