diff options
author | David Sterba <dsterba@suse.cz> | 2014-06-14 18:49:36 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2014-10-02 10:30:40 -0400 |
commit | 6197d86eabb844c1a9c99956d4e6b0f8eb548ad3 (patch) | |
tree | d26ec3e9070147d7c411f711be4b0dec6a711cd7 | |
parent | 58dc4ce4325108b35425ffd30e6acfad9644d49d (diff) |
btrfs: return void from readahead_tree_block
Errors in readahead are not fatal and ignored elsewhere in the code.
Signed-off-by: David Sterba <dsterba@suse.cz>
-rw-r--r-- | fs/btrfs/disk-io.c | 6 | ||||
-rw-r--r-- | fs/btrfs/disk-io.h | 2 | ||||
-rw-r--r-- | fs/btrfs/extent-tree.c | 4 |
3 files changed, 4 insertions, 8 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index ff83748d39da..332f63518156 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -1062,19 +1062,17 @@ static const struct address_space_operations btree_aops = { | |||
1062 | .set_page_dirty = btree_set_page_dirty, | 1062 | .set_page_dirty = btree_set_page_dirty, |
1063 | }; | 1063 | }; |
1064 | 1064 | ||
1065 | int readahead_tree_block(struct btrfs_root *root, u64 bytenr, u32 blocksize) | 1065 | void readahead_tree_block(struct btrfs_root *root, u64 bytenr, u32 blocksize) |
1066 | { | 1066 | { |
1067 | struct extent_buffer *buf = NULL; | 1067 | struct extent_buffer *buf = NULL; |
1068 | struct inode *btree_inode = root->fs_info->btree_inode; | 1068 | struct inode *btree_inode = root->fs_info->btree_inode; |
1069 | int ret = 0; | ||
1070 | 1069 | ||
1071 | buf = btrfs_find_create_tree_block(root, bytenr, blocksize); | 1070 | buf = btrfs_find_create_tree_block(root, bytenr, blocksize); |
1072 | if (!buf) | 1071 | if (!buf) |
1073 | return 0; | 1072 | return; |
1074 | read_extent_buffer_pages(&BTRFS_I(btree_inode)->io_tree, | 1073 | read_extent_buffer_pages(&BTRFS_I(btree_inode)->io_tree, |
1075 | buf, 0, WAIT_NONE, btree_get_extent, 0); | 1074 | buf, 0, WAIT_NONE, btree_get_extent, 0); |
1076 | free_extent_buffer(buf); | 1075 | free_extent_buffer(buf); |
1077 | return ret; | ||
1078 | } | 1076 | } |
1079 | 1077 | ||
1080 | int reada_tree_block_flagged(struct btrfs_root *root, u64 bytenr, u32 blocksize, | 1078 | int reada_tree_block_flagged(struct btrfs_root *root, u64 bytenr, u32 blocksize, |
diff --git a/fs/btrfs/disk-io.h b/fs/btrfs/disk-io.h index 8cd6a53db621..0d9793f6b594 100644 --- a/fs/btrfs/disk-io.h +++ b/fs/btrfs/disk-io.h | |||
@@ -46,7 +46,7 @@ struct btrfs_fs_devices; | |||
46 | 46 | ||
47 | struct extent_buffer *read_tree_block(struct btrfs_root *root, u64 bytenr, | 47 | struct extent_buffer *read_tree_block(struct btrfs_root *root, u64 bytenr, |
48 | u32 blocksize, u64 parent_transid); | 48 | u32 blocksize, u64 parent_transid); |
49 | int readahead_tree_block(struct btrfs_root *root, u64 bytenr, u32 blocksize); | 49 | void readahead_tree_block(struct btrfs_root *root, u64 bytenr, u32 blocksize); |
50 | int reada_tree_block_flagged(struct btrfs_root *root, u64 bytenr, u32 blocksize, | 50 | int reada_tree_block_flagged(struct btrfs_root *root, u64 bytenr, u32 blocksize, |
51 | int mirror_num, struct extent_buffer **eb); | 51 | int mirror_num, struct extent_buffer **eb); |
52 | struct extent_buffer *btrfs_find_create_tree_block(struct btrfs_root *root, | 52 | struct extent_buffer *btrfs_find_create_tree_block(struct btrfs_root *root, |
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 058abd088f0f..e0468a9789a5 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -7486,9 +7486,7 @@ static noinline void reada_walk_down(struct btrfs_trans_handle *trans, | |||
7486 | continue; | 7486 | continue; |
7487 | } | 7487 | } |
7488 | reada: | 7488 | reada: |
7489 | ret = readahead_tree_block(root, bytenr, blocksize); | 7489 | readahead_tree_block(root, bytenr, blocksize); |
7490 | if (ret) | ||
7491 | break; | ||
7492 | nread++; | 7490 | nread++; |
7493 | } | 7491 | } |
7494 | wc->reada_slot = slot; | 7492 | wc->reada_slot = slot; |