btrfs: sink blocksize parameter to reada_tree_block_flagged
authorDavid Sterba <dsterba@suse.cz>
Sun, 15 Jun 2014 00:24:21 +0000 (02:24 +0200)
committerDavid Sterba <dsterba@suse.cz>
Fri, 12 Dec 2014 17:07:20 +0000 (18:07 +0100)
Signed-off-by: David Sterba <dsterba@suse.cz>
fs/btrfs/disk-io.c
fs/btrfs/disk-io.h
fs/btrfs/reada.c

index be9d7c6124890e484a4d1b34145b197d243c827c..8123b03b1f9dc43d0a6623e1eaffaa52481f6871 100644 (file)
@@ -1086,7 +1086,7 @@ void readahead_tree_block(struct btrfs_root *root, u64 bytenr)
        free_extent_buffer(buf);
 }
 
-int reada_tree_block_flagged(struct btrfs_root *root, u64 bytenr, u32 blocksize,
+int reada_tree_block_flagged(struct btrfs_root *root, u64 bytenr,
                         int mirror_num, struct extent_buffer **eb)
 {
        struct extent_buffer *buf = NULL;
@@ -1094,7 +1094,7 @@ int reada_tree_block_flagged(struct btrfs_root *root, u64 bytenr, u32 blocksize,
        struct extent_io_tree *io_tree = &BTRFS_I(btree_inode)->io_tree;
        int ret;
 
-       buf = btrfs_find_create_tree_block(root, bytenr, blocksize);
+       buf = btrfs_find_create_tree_block(root, bytenr, root->nodesize);
        if (!buf)
                return 0;
 
index 9cf4359ace057e30148d160baf7f110efc56982c..4d4ecdd9f4a262233ab0e3d8a7d74f2a59849800 100644 (file)
@@ -47,7 +47,7 @@ struct btrfs_fs_devices;
 struct extent_buffer *read_tree_block(struct btrfs_root *root, u64 bytenr,
                                      u64 parent_transid);
 void readahead_tree_block(struct btrfs_root *root, u64 bytenr);
-int reada_tree_block_flagged(struct btrfs_root *root, u64 bytenr, u32 blocksize,
+int reada_tree_block_flagged(struct btrfs_root *root, u64 bytenr,
                         int mirror_num, struct extent_buffer **eb);
 struct extent_buffer *btrfs_find_create_tree_block(struct btrfs_root *root,
                                                   u64 bytenr, u32 blocksize);
index 5c3fde6571bb2f02d1758530d0f0984dbdde0833..4d3d4e5287c52e2c8e6cf92ee510c2680407cddd 100644 (file)
@@ -721,7 +721,7 @@ static int reada_start_machine_dev(struct btrfs_fs_info *fs_info,
 
        atomic_inc(&dev->reada_in_flight);
        ret = reada_tree_block_flagged(fs_info->extent_root, logical,
-                       fs_info->tree_root->nodesize, mirror_num, &eb);
+                       mirror_num, &eb);
        if (ret)
                __readahead_hook(fs_info->extent_root, NULL, logical, ret);
        else if (eb)