btrfs-progs: Remove btrfs_read_super_device as there is no implementation
[platform/upstream/btrfs-progs.git] / cmds-check.c
index e49b529..c5faa2b 100644 (file)
@@ -1967,6 +1967,7 @@ out:
 static void reada_walk_down(struct btrfs_root *root,
                            struct extent_buffer *node, int slot)
 {
+       struct btrfs_fs_info *fs_info = root->fs_info;
        u64 bytenr;
        u64 ptr_gen;
        u32 nritems;
@@ -1979,11 +1980,11 @@ static void reada_walk_down(struct btrfs_root *root,
                return;
 
        nritems = btrfs_header_nritems(node);
-       blocksize = root->fs_info->nodesize;
+       blocksize = fs_info->nodesize;
        for (i = slot; i < nritems; i++) {
                bytenr = btrfs_node_blockptr(node, i);
                ptr_gen = btrfs_node_ptr_generation(node, i);
-               readahead_tree_block(root, bytenr, blocksize, ptr_gen);
+               readahead_tree_block(fs_info, bytenr, blocksize, ptr_gen);
        }
 }
 
@@ -6625,7 +6626,7 @@ static int process_chunk_item(struct cache_tree *chunk_cache,
         * wrong onwer(3) out of chunk tree, to pass both chunk tree check
         * and owner<->key_type check.
         */
-       ret = btrfs_check_chunk_valid(global_info->tree_root, eb, chunk, slot,
+       ret = btrfs_check_chunk_valid(global_info, eb, chunk, slot,
                                      key->offset);
        if (ret < 0) {
                error("chunk(%llu, %llu) is not valid, ignore it",
@@ -7610,6 +7611,7 @@ static int run_next_block(struct btrfs_root *root,
                          struct device_extent_tree *dev_extent_cache,
                          struct root_item_record *ri)
 {
+       struct btrfs_fs_info *fs_info = root->fs_info;
        struct extent_buffer *buf;
        struct extent_record *rec = NULL;
        u64 bytenr;
@@ -7639,7 +7641,7 @@ static int run_next_block(struct btrfs_root *root,
                                continue;
 
                        /* fixme, get the parent transid */
-                       readahead_tree_block(root, bits[i].start,
+                       readahead_tree_block(fs_info, bits[i].start,
                                             bits[i].size, 0);
                }
        }
@@ -10925,7 +10927,7 @@ static int check_dev_extent_item(struct btrfs_fs_info *fs_info,
 
        l = path.nodes[0];
        chunk = btrfs_item_ptr(l, path.slots[0], struct btrfs_chunk);
-       ret = btrfs_check_chunk_valid(chunk_root, l, chunk, path.slots[0],
+       ret = btrfs_check_chunk_valid(fs_info, l, chunk, path.slots[0],
                                      chunk_key.offset);
        if (ret < 0)
                goto out;
@@ -11183,7 +11185,7 @@ static int check_chunk_item(struct btrfs_fs_info *fs_info,
        chunk = btrfs_item_ptr(eb, slot, struct btrfs_chunk);
        length = btrfs_chunk_length(eb, chunk);
        chunk_end = chunk_key.offset + length;
-       ret = btrfs_check_chunk_valid(extent_root, eb, chunk, slot,
+       ret = btrfs_check_chunk_valid(fs_info, eb, chunk, slot,
                                      chunk_key.offset);
        if (ret < 0) {
                error("chunk[%llu %llu) is invalid", chunk_key.offset,