diff options
author | Qu Wenruo <quwenruo@cn.fujitsu.com> | 2016-02-22 14:59:55 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-02-26 17:27:58 +0100 |
commit | 9db13dca2f00b8a7cfd31fb737cfd0e73ad48abf (patch) | |
tree | adc2cea9c6e95ab693b657d092e29f3ea223cb44 /btrfs-corrupt-block.c | |
parent | 43318324d20cccccfacf2e82ac10e27eefb6cc95 (diff) |
btrfs-progs: Add support for tree block operations on fs_info without roots
Since open_ctree_fs_info() now may return a fs_info even without any
roots, modify functions like read_tree_block() to operate with such
fs_info.
This provides the basis for btrfs-find-root to operate on chunk tree
with corrupted fs.
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
[ coding style adjustments, unified declarations ]
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'btrfs-corrupt-block.c')
-rw-r--r-- | btrfs-corrupt-block.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/btrfs-corrupt-block.c b/btrfs-corrupt-block.c index c908b7e8..be5cd7ea 100644 --- a/btrfs-corrupt-block.c +++ b/btrfs-corrupt-block.c @@ -45,7 +45,7 @@ static struct extent_buffer *debug_corrupt_block(struct btrfs_root *root, int num_copies; int mirror_num = 1; - eb = btrfs_find_create_tree_block(root, bytenr, blocksize); + eb = btrfs_find_create_tree_block(root->fs_info, bytenr, blocksize); if (!eb) return NULL; |