summaryrefslogtreecommitdiff
path: root/disk-io.h
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2012-02-05 16:11:48 -0500
committerChris Mason <chris.mason@oracle.com>2012-02-05 16:11:48 -0500
commite7580bb29644128d19cfe70a16df713bdcc58a43 (patch)
tree25889d9d37f26e4c796c2955032a2dfbe645e47d /disk-io.h
parent6cd813b6fc18ba75edfcfad5857d27f0265c2c28 (diff)
downloadbtrfs-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.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/disk-io.h b/disk-io.h
index 2048fcf..53e9b17 100644
--- a/disk-io.h
+++ b/disk-io.h
@@ -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,