diff options
author | Yan Zheng <zheng.yan@oracle.com> | 2008-11-20 09:52:48 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-11-20 09:52:48 -0500 |
commit | aa62e84c84436593edb56c9b9c61fa701c69f80e (patch) | |
tree | 41d06e2caee4af7a1d8933d9481f80c95a84acf0 /disk-io.c | |
parent | 49bc666d5fcedc7221eeeef0499e21a45c3ca4ad (diff) | |
download | btrfs-progs-aa62e84c84436593edb56c9b9c61fa701c69f80e.tar.gz |
Btrfs image tool
This patch adds btrfs image tool. The image tool is
a debugging tool that creates/restores btrfs metadump
image.
Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Diffstat (limited to 'disk-io.c')
-rw-r--r-- | disk-io.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -646,8 +646,10 @@ struct btrfs_root *open_ctree_fd(int fp, const char *path, u64 sb_bytenr, (unsigned long)btrfs_header_chunk_tree_uuid(chunk_root->node), BTRFS_UUID_SIZE); - ret = btrfs_read_chunk_tree(chunk_root); - BUG_ON(ret); + if (!(btrfs_super_flags(disk_super) & BTRFS_SUPER_FLAG_METADUMP)) { + ret = btrfs_read_chunk_tree(chunk_root); + BUG_ON(ret); + } blocksize = btrfs_level_size(tree_root, btrfs_super_root_level(disk_super)); |