search for: orig_level

Displaying 3 results from an estimated 3 matches for "orig_level".

2007 Sep 23
0
[patch]fix get_bh and brelse issues when drop snapshot
...n drop a snapshot. Regards YZ diff -r 29b8cc7794ac extent-tree.c --- a/extent-tree.c Thu Sep 20 14:14:42 2007 -0400 +++ b/extent-tree.c Sun Sep 23 12:35:00 2007 +0800 @@ -1483,6 +1483,7 @@ int btrfs_drop_snapshot(struct btrfs_tra level = btrfs_header_level(btrfs_buffer_header(root->node)); orig_level = level; if (btrfs_disk_key_objectid(&root_item->drop_progress) == 0) { + get_bh(root->node); path->nodes[level] = root->node; path->slots[level] = 0; } else { @@ -1516,7 +1517,6 @@ int btrfs_drop_snapshot(struct btrfs_tra if (wret < 0) ret = wret; ret = -...
2011 Mar 23
0
[PATCH] Btrfs: cleanup some BUG_ON()
...diff -urNp linux-2.6.38/fs/btrfs/tree-log.c linux-2.6.38.new/fs/btrfs/tree-log.c --- linux-2.6.38/fs/btrfs/tree-log.c 2011-03-15 10:20:32.000000000 +0900 +++ linux-2.6.38.new/fs/btrfs/tree-log.c 2011-03-23 11:28:09.000000000 +0900 @@ -1821,7 +1821,8 @@ static int walk_log_tree(struct btrfs_tr int orig_level; path = btrfs_alloc_path(); - BUG_ON(!path); + if (!path) + return -ENOMEM; level = btrfs_header_level(log->node); orig_level = level; @@ -3107,9 +3108,11 @@ int btrfs_recover_log_trees(struct btrfs .stage = 0, }; - fs_info->log_root_recovering = 1; path = btrfs_alloc_path...
2013 Oct 07
0
[PATCH] Btrfs: cleanup reserved space when freeing tree log on error
...btrfs_wait_tree_block_writeback(next); + btrfs_tree_unlock(next); + } WARN_ON(root_owner != BTRFS_TREE_LOG_OBJECTID); ret = btrfs_free_and_pin_reserved_extent(root, @@ -2301,11 +2305,13 @@ static int walk_log_tree(struct btrfs_trans_handle *trans, next = path->nodes[orig_level]; - btrfs_tree_lock(next); - btrfs_set_lock_blocking(next); - clean_tree_block(trans, log, next); - btrfs_wait_tree_block_writeback(next); - btrfs_tree_unlock(next); + if (trans) { + btrfs_tree_lock(next); + btrfs_set_lock_blocking(next); + clean_tree_block(trans, log, next);...