diff options
author | Josef Bacik <jbacik@fb.com> | 2016-09-02 15:40:03 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-09-26 11:59:49 -0400 |
commit | 8436ea91a1c4fd8ed57ff0c0ca482ee3dbe744c7 (patch) | |
tree | 3f28586a9624aad931afc0a9bee8d3a739fd38ae /fs/btrfs/disk-io.c | |
parent | afcdd129e05a9210a5d19d4aa6e0afa475fc49e2 (diff) |
Btrfs: kill the start argument to read_extent_buffer_pages
Nobody uses this, it makes no sense to do partial reads of extent buffers.
Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index f92bfa8ffd41..e4c2428cee85 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -442,7 +442,7 @@ static int btrfs_check_super_csum(char *raw_disk_sb) | |||
442 | */ | 442 | */ |
443 | static int btree_read_extent_buffer_pages(struct btrfs_root *root, | 443 | static int btree_read_extent_buffer_pages(struct btrfs_root *root, |
444 | struct extent_buffer *eb, | 444 | struct extent_buffer *eb, |
445 | u64 start, u64 parent_transid) | 445 | u64 parent_transid) |
446 | { | 446 | { |
447 | struct extent_io_tree *io_tree; | 447 | struct extent_io_tree *io_tree; |
448 | int failed = 0; | 448 | int failed = 0; |
@@ -454,8 +454,7 @@ static int btree_read_extent_buffer_pages(struct btrfs_root *root, | |||
454 | clear_bit(EXTENT_BUFFER_CORRUPT, &eb->bflags); | 454 | clear_bit(EXTENT_BUFFER_CORRUPT, &eb->bflags); |
455 | io_tree = &BTRFS_I(root->fs_info->btree_inode)->io_tree; | 455 | io_tree = &BTRFS_I(root->fs_info->btree_inode)->io_tree; |
456 | while (1) { | 456 | while (1) { |
457 | ret = read_extent_buffer_pages(io_tree, eb, start, | 457 | ret = read_extent_buffer_pages(io_tree, eb, WAIT_COMPLETE, |
458 | WAIT_COMPLETE, | ||
459 | btree_get_extent, mirror_num); | 458 | btree_get_extent, mirror_num); |
460 | if (!ret) { | 459 | if (!ret) { |
461 | if (!verify_parent_transid(io_tree, eb, | 460 | if (!verify_parent_transid(io_tree, eb, |
@@ -1132,7 +1131,7 @@ void readahead_tree_block(struct btrfs_root *root, u64 bytenr) | |||
1132 | if (IS_ERR(buf)) | 1131 | if (IS_ERR(buf)) |
1133 | return; | 1132 | return; |
1134 | read_extent_buffer_pages(&BTRFS_I(btree_inode)->io_tree, | 1133 | read_extent_buffer_pages(&BTRFS_I(btree_inode)->io_tree, |
1135 | buf, 0, WAIT_NONE, btree_get_extent, 0); | 1134 | buf, WAIT_NONE, btree_get_extent, 0); |
1136 | free_extent_buffer(buf); | 1135 | free_extent_buffer(buf); |
1137 | } | 1136 | } |
1138 | 1137 | ||
@@ -1150,7 +1149,7 @@ int reada_tree_block_flagged(struct btrfs_root *root, u64 bytenr, | |||
1150 | 1149 | ||
1151 | set_bit(EXTENT_BUFFER_READAHEAD, &buf->bflags); | 1150 | set_bit(EXTENT_BUFFER_READAHEAD, &buf->bflags); |
1152 | 1151 | ||
1153 | ret = read_extent_buffer_pages(io_tree, buf, 0, WAIT_PAGE_LOCK, | 1152 | ret = read_extent_buffer_pages(io_tree, buf, WAIT_PAGE_LOCK, |
1154 | btree_get_extent, mirror_num); | 1153 | btree_get_extent, mirror_num); |
1155 | if (ret) { | 1154 | if (ret) { |
1156 | free_extent_buffer(buf); | 1155 | free_extent_buffer(buf); |
@@ -1206,7 +1205,7 @@ struct extent_buffer *read_tree_block(struct btrfs_root *root, u64 bytenr, | |||
1206 | if (IS_ERR(buf)) | 1205 | if (IS_ERR(buf)) |
1207 | return buf; | 1206 | return buf; |
1208 | 1207 | ||
1209 | ret = btree_read_extent_buffer_pages(root, buf, 0, parent_transid); | 1208 | ret = btree_read_extent_buffer_pages(root, buf, parent_transid); |
1210 | if (ret) { | 1209 | if (ret) { |
1211 | free_extent_buffer(buf); | 1210 | free_extent_buffer(buf); |
1212 | return ERR_PTR(ret); | 1211 | return ERR_PTR(ret); |
@@ -4081,7 +4080,7 @@ void btrfs_btree_balance_dirty_nodelay(struct btrfs_root *root) | |||
4081 | int btrfs_read_buffer(struct extent_buffer *buf, u64 parent_transid) | 4080 | int btrfs_read_buffer(struct extent_buffer *buf, u64 parent_transid) |
4082 | { | 4081 | { |
4083 | struct btrfs_root *root = BTRFS_I(buf->pages[0]->mapping->host)->root; | 4082 | struct btrfs_root *root = BTRFS_I(buf->pages[0]->mapping->host)->root; |
4084 | return btree_read_extent_buffer_pages(root, buf, 0, parent_transid); | 4083 | return btree_read_extent_buffer_pages(root, buf, parent_transid); |
4085 | } | 4084 | } |
4086 | 4085 | ||
4087 | static int btrfs_check_super_valid(struct btrfs_fs_info *fs_info, | 4086 | static int btrfs_check_super_valid(struct btrfs_fs_info *fs_info, |