]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
btrfs: remove unused parameter phy_offset from btrfs_validate_metadata_buffer
authorQu Wenruo <wqu@suse.com>
Thu, 12 Nov 2020 08:47:57 +0000 (16:47 +0800)
committerDavid Sterba <dsterba@suse.com>
Tue, 8 Dec 2020 14:54:14 +0000 (15:54 +0100)
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: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/disk-io.c
fs/btrfs/disk-io.h
fs/btrfs/extent_io.c

index 8c87a1caefff19471d17298afaa980e0dfedae1c..37b2e0aad1622a18ba400e9eda7b0560497c83cf 100644 (file)
@@ -593,7 +593,7 @@ out:
        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,
                                   int mirror)
 {
index e75ea6092942311ece25ceb39a93a0a1c6d9f1f4..40e81d6e481ee80d1445414d755cfb08c092e1c1 100644 (file)
@@ -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_drop_and_free_fs_root(struct btrfs_fs_info *fs_info,
                                 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,
                                   int mirror);
 blk_status_t btrfs_submit_metadata_bio(struct inode *inode, struct bio *bio,
index 97c759998f384b4ca7e1a3fc0d19ef18b1aed75e..67faa7797d891a17520833dd5e5a28f4c01a9be8 100644 (file)
@@ -2919,7 +2919,7 @@ static void end_bio_extent_readpage(struct bio *bio)
                                                             start, end, mirror);
                        else
                                ret = btrfs_validate_metadata_buffer(io_bio,
-                                       offset, page, start, end, mirror);
+                                       page, start, end, mirror);
                        if (ret)
                                uptodate = 0;
                        else