search for: btrfs_orphan_del

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

2011 Sep 21
3
[PATCH] Btrfs: fix orphan cleanup regression
...INODE_ITEM_KEY; found_key.offset = 0; inode = btrfs_iget(root->fs_info->sb, &found_key, root, NULL); - if (IS_ERR(inode)) { - ret = PTR_ERR(inode); + ret = PTR_RET(inode); + if (ret && ret != -ESTALE) goto out; - } - - /* - * add this inode to the orphan list so btrfs_orphan_del does - * the proper thing when we hit it - */ - spin_lock(&root->orphan_lock); - list_add(&BTRFS_I(inode)->i_orphan, &root->orphan_list); - spin_unlock(&root->orphan_lock); /* - * if this is a bad inode, means we actually succeeded in - * removing the ino...
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 Aug 08
0
[PATCH] Btrfs: fix how we reserve space for deleting inodes
...BUG_ON(ret != -EAGAIN); - ret = btrfs_commit_transaction(trans, root); - BUG_ON(ret); - continue; + trans = btrfs_start_transaction(root, 2); + if (IS_ERR(trans)) { + printk(KERN_WARNING "Could not get space for a " + "delete, will truncate on mount\n"); + btrfs_orphan_del(NULL, inode); + goto no_delete; } ret = btrfs_truncate_inode_items(trans, root, inode, 0, 0); @@ -3574,14 +3580,15 @@ void btrfs_evict_inode(struct inode *inode) btrfs_end_transaction(trans, root); trans = NULL; btrfs_btree_balance_dirty(root, nr); - } if (ret == 0) { + tr...
2013 Feb 07
1
[PATCH] Btrfs: cleanup orphan reservation if truncate fails
..., 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-info.html
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
2013 Aug 19
11
[RFC PATCH] Btrfs: fix memory leak of orphan block rsv
...ly dirty hack, after some debugging, of freeing the orphan block rsv in btrfs_evict_inode() if its not being used by other tasks, seems to fix the leak without failing xfstests so far. But this is unlikely to be a correct solution without causing issues elsewhere. This commit also changes calls to btrfs_orphan_del() which grabbed the root''s orphan_block_rsv without acquiring the orphan_lock first (confront with btrfs_orphan_commit_root(), which acquires the lock before getting and setting the root''s orphan_block_rsv). This issue is simple to reproduce and observe if kmemleak is enabled. Tw...
2009 Oct 02
0
[PATCH] btrfs: constify dentry_operations
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> --- fs/btrfs/ctree.h | 2 +- fs/btrfs/inode.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -2323,7 +2323,7 @@ int btrfs_orphan_del(struct btrfs_trans_handle *trans, struct inode *inode); void btrfs_orphan_cleanup(struct btrfs_root *root); int btrfs_cont_expand(struct inode *inode, loff_t size); int btrfs_invalidate_inodes(struct btrfs_root *root); -extern struct dentry_operations btrfs_dentry_operations; +extern const struc...
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
2011 Jun 09
2
[PATCH] Btrfs: turn to readonly if btrfs_start_transaction() fails
...1..ecdc333 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -2394,6 +2394,7 @@ int btrfs_orphan_cleanup(struct btrfs_root *root) trans = btrfs_start_transaction(root, 0); if (IS_ERR(trans)) { ret = PTR_ERR(trans); + btrfs_abort_transaction(root, ret); goto out; } btrfs_orphan_del(trans, inode); @@ -2848,6 +2849,8 @@ static struct btrfs_trans_handle *__unlink_start_trans(struct inode *dir, u64 dir_ino = btrfs_ino(dir); trans = btrfs_start_transaction(root, 10); + if (IS_ERR(trans)) + btrfs_abort_transaction(root, PTR_ERR(trans)); if (!IS_ERR(trans) || PTR_ERR(trans)...
2012 Jan 05
4
[RFC][PATCH 3/3] Btrfs: improve truncation of btrfs
...ret) { err = ret; break; } -end_trans: + nr = trans->blocks_used; btrfs_end_transaction(trans, root); trans = NULL; btrfs_btree_balance_dirty(root, nr); } - if (ret == 0 && inode->i_nlink > 0) { - trans->block_rsv = root->orphan_block_rsv; - ret = btrfs_orphan_del(trans, inode); - if (ret) - err = ret; - } else if (ret && inode->i_nlink > 0) { - /* - * Failed to do the truncate, remove us from the in memory - * orphan list. - */ - ret = btrfs_orphan_del(NULL, inode); - } - if (trans) { - trans->block_rsv = &root->fs_info...
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
.../* insert an orphan item to track subvolume contains orphan files */ if (insert >= 2) { ret = btrfs_insert_orphan_item(trans, root->fs_info->tree_root, root->root_key.objectid); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); } return 0; } @@ -2220,7 +2220,7 @@ int btrfs_orphan_del(struct btrfs_trans_handle *trans, struct inode *inode) if (trans && delete_item) { ret = btrfs_del_orphan_item(trans, root, inode->i_ino); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); } if (release_rsv) @@ -2651,7 +2651,7 @@ int btrfs_unlink_inode(struct btrfs_trans_handle...
2008 Jun 24
1
[RFC][PATCH] btrfs orphan code
...this inode + * from the orphan list. + * + * If del_backref is 1 we need to remove the inode reference to the orphan dir. + * btrfs_delete_inode will remove the inode ref, so we don''t need to remove it + * here, but truncate doesn''t do that so you have to remove the ref. + */ +int btrfs_orphan_del(struct btrfs_trans_handle *trans, struct inode *inode) +{ + struct btrfs_root *root; + struct inode *dir; + struct btrfs_path *path; + struct btrfs_dir_item *di; + struct extent_buffer *leaf; + char *name; + int ret = 0, name_len; + + if (list_empty(&BTRFS_I(inode)->i_orphan)) + goto out; +...
2009 Aug 24
0
[PATCH] Btrfs: proper metadata -ENOSPC handling
...tent = btrfs_lookup_ordered_extent(inode, start); @@ -1981,7 +1990,9 @@ void btrfs_orphan_cleanup(struct btrfs_root *root) * do a destroy_inode */ if (is_bad_inode(inode)) { + /* 1 item for the orphan entry */ trans = btrfs_start_transaction(root, 1); + BUG_ON(IS_ERR(trans)); btrfs_orphan_del(trans, inode); btrfs_end_transaction(trans, root); iput(inode); @@ -2337,7 +2348,16 @@ static int btrfs_unlink(struct inode *dir, struct dentry *dentry) root = BTRFS_I(dir)->root; - trans = btrfs_start_transaction(root, 1); + /* + * 1 item for the orphan entry + * 1 for the actua...