static u64 data_bytes_referenced = 0;
static int found_old_backref = 0;
static LIST_HEAD(duplicate_extents);
+static int repair = 0;
struct extent_backref {
struct list_head list;
}
static int check_inode_recs(struct btrfs_root *root,
- struct cache_tree *inode_cache, int repair)
+ struct cache_tree *inode_cache)
{
struct cache_extent *cache;
struct ptr_node *node;
static int check_fs_root(struct btrfs_root *root,
struct cache_tree *root_cache,
- struct walk_control *wc, int repair)
+ struct walk_control *wc)
{
int ret = 0;
int wret;
root_node.current);
}
- ret = check_inode_recs(root, &root_node.inode_cache, repair);
+ ret = check_inode_recs(root, &root_node.inode_cache);
return ret;
}
}
static int check_fs_roots(struct btrfs_root *root,
- struct cache_tree *root_cache,
- int repair)
+ struct cache_tree *root_cache)
{
struct btrfs_path path;
struct btrfs_key key;
err = 1;
goto next;
}
- ret = check_fs_root(tmp_root, root_cache, &wc, repair);
+ ret = check_fs_root(tmp_root, root_cache, &wc);
if (ret)
err = 1;
btrfs_free_fs_root(tmp_root);
static int check_extent_refs(struct btrfs_trans_handle *trans,
struct btrfs_root *root,
- struct cache_tree *extent_cache, int repair)
+ struct cache_tree *extent_cache)
{
struct extent_record *rec;
struct cache_extent *cache;
return ret;
}
-static int check_chunks_and_extents(struct btrfs_root *root, int repair)
+static int check_chunks_and_extents(struct btrfs_root *root)
{
struct rb_root dev_cache;
struct cache_tree chunk_cache;
break;
}
- ret = check_extent_refs(trans, root, &extent_cache, repair);
+ ret = check_extent_refs(trans, root, &extent_cache);
if (ret == -EAGAIN) {
ret = btrfs_commit_transaction(trans, root);
if (ret)
char uuidbuf[37];
int ret;
int num;
- int repair = 0;
int option_index = 0;
int init_csum_tree = 0;
int init_extent_tree = 0;
exit(1);
goto out;
}
- ret = check_chunks_and_extents(root, repair);
+ ret = check_chunks_and_extents(root);
if (ret)
fprintf(stderr, "Errors found in extent allocation tree or chunk allocation\n");
goto out;
fprintf(stderr, "checking fs roots\n");
- ret = check_fs_roots(root, &root_cache, repair);
+ ret = check_fs_roots(root, &root_cache);
if (ret)
goto out;