summaryrefslogtreecommitdiff
path: root/disk-io.h
diff options
context:
space:
mode:
authorLu Fengqi <lufq.fnst@cn.fujitsu.com>2016-03-07 12:57:41 +0800
committerDavid Sterba <dsterba@suse.com>2016-03-14 13:42:47 +0100
commit05640939ea24c609c7c2badc76ebba9ec6a4896d (patch)
tree1ee641f486db5a5767aa52d8f2603eae73451b10 /disk-io.h
parentda3ae9c69ab4e557e625cabe8894e442def60b62 (diff)
btrfs-progs: Add new option for specify chunk root bytenr
Add new btrfsck option, '--chunk-root', to specify chunk root bytenr. And allow open_ctree_fs_info() function accept chunk_root_bytenr to override the bytenr in superblock. This will be mainly used when chunk tree corruption. Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'disk-io.h')
-rw-r--r--disk-io.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/disk-io.h b/disk-io.h
index 30ccb2bd..b97b90be 100644
--- a/disk-io.h
+++ b/disk-io.h
@@ -109,7 +109,8 @@ void btrfs_cleanup_all_caches(struct btrfs_fs_info *fs_info);
int btrfs_scan_fs_devices(int fd, const char *path,
struct btrfs_fs_devices **fs_devices, u64 sb_bytenr,
int super_recover, int skip_devices);
-int btrfs_setup_chunk_tree_and_device_map(struct btrfs_fs_info *fs_info);
+int btrfs_setup_chunk_tree_and_device_map(struct btrfs_fs_info *fs_info,
+ u64 chunk_root_bytenr);
struct btrfs_root *open_ctree(const char *filename, u64 sb_bytenr,
enum btrfs_open_ctree_flags flags);
@@ -117,6 +118,7 @@ struct btrfs_root *open_ctree_fd(int fp, const char *path, u64 sb_bytenr,
enum btrfs_open_ctree_flags flags);
struct btrfs_fs_info *open_ctree_fs_info(const char *filename,
u64 sb_bytenr, u64 root_tree_bytenr,
+ u64 chunk_root_bytenr,
enum btrfs_open_ctree_flags flags);
int close_ctree_fs_info(struct btrfs_fs_info *fs_info);
static inline int close_ctree(struct btrfs_root *root)