Commit 8e1dc982 authored by Qu Wenruo's avatar Qu Wenruo Committed by David Sterba

btrfs: remove unused parameter phy_offset from btrfs_validate_metadata_buffer

Parameter @phy_offset is the offset against the bio->bi_iter.bi_sector.
@phy_offset is mostly for data io to lookup the csum in btrfs_io_bio.

But for metadata, it's completely useless as metadata stores their own
csum in its header, so we can remove it.

Note: parameters @start and @end, they are not utilized at all for
current sectorsize == PAGE_SIZE case, as we can grab eb directly from
page.

But those two parameters are very important for later subpage support,
thus @start/@len are not touched here.
Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: default avatarJosef Bacik <josef@toxicpanda.com>
Reviewed-by: default avatarNikolay Borisov <nborisov@suse.com>
Signed-off-by: default avatarQu Wenruo <wqu@suse.com>
Reviewed-by: default avatarNikolay Borisov <nborisov@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 2c363954
...@@ -593,7 +593,7 @@ static int validate_extent_buffer(struct extent_buffer *eb) ...@@ -593,7 +593,7 @@ static int validate_extent_buffer(struct extent_buffer *eb)
return ret; return ret;
} }
int btrfs_validate_metadata_buffer(struct btrfs_io_bio *io_bio, u64 phy_offset, int btrfs_validate_metadata_buffer(struct btrfs_io_bio *io_bio,
struct page *page, u64 start, u64 end, struct page *page, u64 start, u64 end,
int mirror) int mirror)
{ {
......
...@@ -79,7 +79,7 @@ void btrfs_btree_balance_dirty(struct btrfs_fs_info *fs_info); ...@@ -79,7 +79,7 @@ void btrfs_btree_balance_dirty(struct btrfs_fs_info *fs_info);
void btrfs_btree_balance_dirty_nodelay(struct btrfs_fs_info *fs_info); void btrfs_btree_balance_dirty_nodelay(struct btrfs_fs_info *fs_info);
void btrfs_drop_and_free_fs_root(struct btrfs_fs_info *fs_info, void btrfs_drop_and_free_fs_root(struct btrfs_fs_info *fs_info,
struct btrfs_root *root); struct btrfs_root *root);
int btrfs_validate_metadata_buffer(struct btrfs_io_bio *io_bio, u64 phy_offset, int btrfs_validate_metadata_buffer(struct btrfs_io_bio *io_bio,
struct page *page, u64 start, u64 end, struct page *page, u64 start, u64 end,
int mirror); int mirror);
blk_status_t btrfs_submit_metadata_bio(struct inode *inode, struct bio *bio, blk_status_t btrfs_submit_metadata_bio(struct inode *inode, struct bio *bio,
......
...@@ -2919,7 +2919,7 @@ static void end_bio_extent_readpage(struct bio *bio) ...@@ -2919,7 +2919,7 @@ static void end_bio_extent_readpage(struct bio *bio)
start, end, mirror); start, end, mirror);
else else
ret = btrfs_validate_metadata_buffer(io_bio, ret = btrfs_validate_metadata_buffer(io_bio,
offset, page, start, end, mirror); page, start, end, mirror);
if (ret) if (ret)
uptodate = 0; uptodate = 0;
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment