diff options
author | Josef Bacik <jbacik@fusionio.com> | 2013-10-23 16:24:03 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-11-07 13:29:30 -0500 |
commit | 337f86fea1d06e189f3cf234adba2567a07678bd (patch) | |
tree | c4fe5f392480000ffbf2419d2ba53568153e304a /disk-io.h | |
parent | 4fc17596aaa2b03ee38c467585465923d62b1510 (diff) |
Btrfs-progs: add -b to btrfsck to look at backup roots
In some cases the tree root is so hosed we can't get anything useful out of it.
So add the -b option to btrfsck to make us look for the most recent backup tree
root to use for repair. Then we can hopefully get ourselves into a working
state. Thanks,
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'disk-io.h')
-rw-r--r-- | disk-io.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -53,7 +53,7 @@ void btrfs_free_fs_info(struct btrfs_fs_info *fs_info); struct btrfs_fs_info *btrfs_new_fs_info(int writable, u64 sb_bytenr); int btrfs_check_fs_compatibility(struct btrfs_super_block *sb, int writable); int btrfs_setup_all_roots(struct btrfs_fs_info *fs_info, - u64 root_tree_bytenr, int partial); + u64 root_tree_bytenr, int partial, int backup_root); void btrfs_release_all_roots(struct btrfs_fs_info *fs_info); void btrfs_cleanup_all_caches(struct btrfs_fs_info *fs_info); int btrfs_scan_fs_devices(int fd, const char *path, @@ -69,7 +69,8 @@ struct btrfs_fs_info *open_ctree_fs_info_restore(const char *filename, int writes, int partial); struct btrfs_fs_info *open_ctree_fs_info(const char *filename, u64 sb_bytenr, u64 root_tree_bytenr, - int writes, int partial); + int writes, int partial, + int backup_root); struct btrfs_root *open_ctree_with_broken_super(const char *filename, u64 sb_bytenr, int writes); int close_ctree(struct btrfs_root *root); |