diff options
author | Josef Bacik <jbacik@fusionio.com> | 2013-05-17 09:34:23 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-06-19 13:52:34 -0400 |
commit | 439ce45e4880c1f741bf4b0681d6c476e43760b2 (patch) | |
tree | 0edec57a99f409111a2aaae9d9716aaac69e7bec /ctree.h | |
parent | f5201efdb0955eb8070021989371a48eeab5d3b2 (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.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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, |