search for: orphan_item_inserted

Displaying 4 results from an estimated 4 matches for "orphan_item_inserted".

2011 Dec 02
3
[PATCH] Btrfs: protect orphan block rsv with spin_lock
...p;root->orphan_lock); + return; + } + + if (root->orphan_cleanup_state != ORPHAN_CLEANUP_DONE) { + spin_unlock(&root->orphan_lock); + return; + } + + block_rsv = root->orphan_block_rsv; + root->orphan_block_rsv = NULL; + spin_unlock(&root->orphan_lock); + if (root->orphan_item_inserted && btrfs_root_refs(&root->root_item) > 0) { ret = btrfs_del_orphan_item(trans, root->fs_info->tree_root, @@ -1965,10 +1981,9 @@ void btrfs_orphan_commit_root(struct btrfs_trans_handle *trans, root->orphan_item_inserted = 0; } - if (root->orphan_block_rs...
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
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...shot(struct btrfs_trans_handle *trans, num_bytes = root->orphan_block_rsv->size; ret = btrfs_block_rsv_migrate(&pending->block_rsv, block_rsv, num_bytes); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); #if 0 /* insert orphan item for the snapshot */ WARN_ON(!root->orphan_item_inserted); ret = btrfs_insert_orphan_item(trans, root->fs_info->tree_root, snap->root_key.objectid); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); snap->orphan_item_inserted = 1; #endif } @@ -2108,7 +2108,7 @@ void btrfs_orphan_commit_root(struct btrfs_trans_handle *trans,...
2013 Aug 19
11
[RFC PATCH] Btrfs: fix memory leak of orphan block rsv
...rsv = NULL; + if (root->orphan_block_rsv && + atomic_dec_and_test(&root->orphan_block_rsv->count)) { + block_rsv = root->orphan_block_rsv; + root->orphan_block_rsv = NULL; + } else { + block_rsv = NULL; + } spin_unlock(&root->orphan_lock); if (root->orphan_item_inserted && @@ -2918,6 +2923,7 @@ int btrfs_orphan_add(struct btrfs_trans_handle *trans, struct inode *inode) btrfs_free_block_rsv(root, block_rsv); block_rsv = NULL; } + atomic_inc(&root->orphan_block_rsv->count); if (!test_and_set_bit(BTRFS_INODE_HAS_ORPHAN_ITEM, &a...