diff options
author | Chris Mason <chris.mason@oracle.com> | 2012-02-05 16:11:48 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2012-02-05 16:11:48 -0500 |
commit | e7580bb29644128d19cfe70a16df713bdcc58a43 (patch) | |
tree | 25889d9d37f26e4c796c2955032a2dfbe645e47d /disk-io.h | |
parent | 6cd813b6fc18ba75edfcfad5857d27f0265c2c28 (diff) | |
download | btrfs-progs-e7580bb29644128d19cfe70a16df713bdcc58a43.tar.gz |
Add open_ctree_fs_info for partial FS opens
fsck needs to be able to open a damaged FS, which means open_ctree needs
to be able to return a damaged FS.
This adds a new open_ctree_fs_info which can be used to open any and all
roots that are valid. btrfs-debug-tree is changed to use it.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'disk-io.h')
-rw-r--r-- | disk-io.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -48,6 +48,9 @@ struct btrfs_root *open_ctree_fd(int fp, const char *path, u64 sb_bytenr, int writes); struct btrfs_root *open_ctree_recovery(const char *filename, u64 sb_bytenr, u64 root_tree_bytenr); +struct btrfs_fs_info *open_ctree_fs_info(const char *filename, + u64 sb_bytenr, int writes, + int partial); int close_ctree(struct btrfs_root *root); int write_all_supers(struct btrfs_root *root); int write_ctree_super(struct btrfs_trans_handle *trans, |