summaryrefslogtreecommitdiff
path: root/ctree.h
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fusionio.com>2013-05-17 09:34:23 -0400
committerChris Mason <chris.mason@fusionio.com>2013-06-19 13:52:34 -0400
commit439ce45e4880c1f741bf4b0681d6c476e43760b2 (patch)
tree0edec57a99f409111a2aaae9d9716aaac69e7bec /ctree.h
parentf5201efdb0955eb8070021989371a48eeab5d3b2 (diff)
Btrfs-progs: add --init-extent-tree to btrfsck
In some cases the extent tree can just be so gone there is no point in trying to figure out how to put it back together. So add a --init-extent-tree mode which will zero out the extent tree and then re-add extents for all of the blocks we find. This will also undo any balance that was going on at the time of the crash, this is needed because the reloc tree seems to confuse fsck at the moment. With this patch I can put back together a users file system that was completely gone. Thanks, Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'ctree.h')
-rw-r--r--ctree.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/ctree.h b/ctree.h
index cc145944..3fe14b0e 100644
--- a/ctree.h
+++ b/ctree.h
@@ -2130,6 +2130,9 @@ int btrfs_write_dirty_block_groups(struct btrfs_trans_handle *trans,
struct btrfs_root *root);
int btrfs_free_block_groups(struct btrfs_fs_info *info);
int btrfs_read_block_groups(struct btrfs_root *root);
+struct btrfs_block_group_cache *
+btrfs_add_block_group(struct btrfs_fs_info *fs_info, u64 bytes_used, u64 type,
+ u64 chunk_objectid, u64 chunk_offset, u64 size);
int btrfs_make_block_group(struct btrfs_trans_handle *trans,
struct btrfs_root *root, u64 bytes_used,
u64 type, u64 chunk_objectid, u64 chunk_offset,
@@ -2149,7 +2152,7 @@ int btrfs_check_leaf(struct btrfs_root *root,
struct btrfs_disk_key *parent_key,
struct extent_buffer *buf);
int btrfs_fsck_reinit_root(struct btrfs_trans_handle *trans,
- struct btrfs_root *root);
+ struct btrfs_root *root, int overwrite);
void reada_for_search(struct btrfs_root *root, struct btrfs_path *path,
int level, int slot, u64 objectid);
struct extent_buffer *read_node_slot(struct btrfs_root *root,