]> git.baikalelectronics.ru Git - kernel.git/commitdiff
btrfs: remove the unused parameter @len for btrfs_bio_fits_in_stripe()
authorQu Wenruo <wqu@suse.com>
Tue, 13 Apr 2021 09:58:48 +0000 (17:58 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Jun 2021 13:19:08 +0000 (15:19 +0200)
The parameter @len is not really used in btrfs_bio_fits_in_stripe(),
just remove it.

It got removed in 420343131970 ("btrfs: let callers of
btrfs_get_io_geometry pass the em"), before that btrfs_get_chunk_map
utilized it.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c
fs/btrfs/volumes.c
fs/btrfs/volumes.h

index 3cd5286572d40af942c63a04d14fe7b0e679df01..bd09ad1fed07b78532c2fbabaae2adf582448274 100644 (file)
@@ -2207,8 +2207,7 @@ int btrfs_bio_fits_in_stripe(struct page *page, size_t size, struct bio *bio,
        em = btrfs_get_chunk_map(fs_info, logical, map_length);
        if (IS_ERR(em))
                return PTR_ERR(em);
-       ret = btrfs_get_io_geometry(fs_info, em, btrfs_op(bio), logical,
-                                   map_length, &geom);
+       ret = btrfs_get_io_geometry(fs_info, em, btrfs_op(bio), logical, &geom);
        if (ret < 0)
                goto out;
 
@@ -8197,7 +8196,7 @@ static blk_qc_t btrfs_submit_direct(struct inode *inode, struct iomap *iomap,
                        goto out_err_em;
                }
                ret = btrfs_get_io_geometry(fs_info, em, btrfs_op(dio_bio),
-                                           logical, submit_len, &geom);
+                                           logical, &geom);
                if (ret) {
                        status = errno_to_blk_status(ret);
                        goto out_err_em;
index e020447b25a2423246bb6be1d70194e7864494ef..80e962788396a8507320e799ec9b99df2fa40416 100644 (file)
@@ -6127,17 +6127,17 @@ static bool need_full_stripe(enum btrfs_map_op op)
  * @em:      mapping containing the logical extent
  * @op:      type of operation - write or read
  * @logical: address that we want to figure out the geometry of
- * @len:     the length of IO we are going to perform, starting at @logical
  * @io_geom: pointer used to return values
  *
  * Returns < 0 in case a chunk for the given logical address cannot be found,
  * usually shouldn't happen unless @logical is corrupted, 0 otherwise.
  */
 int btrfs_get_io_geometry(struct btrfs_fs_info *fs_info, struct extent_map *em,
-                         enum btrfs_map_op op, u64 logical, u64 len,
+                         enum btrfs_map_op op, u64 logical,
                          struct btrfs_io_geometry *io_geom)
 {
        struct map_lookup *map;
+       u64 len;
        u64 offset;
        u64 stripe_offset;
        u64 stripe_nr;
@@ -6243,7 +6243,7 @@ static int __btrfs_map_block(struct btrfs_fs_info *fs_info,
        em = btrfs_get_chunk_map(fs_info, logical, *length);
        ASSERT(!IS_ERR(em));
 
-       ret = btrfs_get_io_geometry(fs_info, em, op, logical, *length, &geom);
+       ret = btrfs_get_io_geometry(fs_info, em, op, logical, &geom);
        if (ret < 0)
                return ret;
 
index 063ce999b9d3b2eedd9117b28a4432bcfdeb39c4..c7fc7caf575c0dc9f7605aaa7e41deaa086c7d6c 100644 (file)
@@ -446,7 +446,7 @@ int btrfs_map_sblock(struct btrfs_fs_info *fs_info, enum btrfs_map_op op,
                     u64 logical, u64 *length,
                     struct btrfs_bio **bbio_ret);
 int btrfs_get_io_geometry(struct btrfs_fs_info *fs_info, struct extent_map *map,
-                         enum btrfs_map_op op, u64 logical, u64 len,
+                         enum btrfs_map_op op, u64 logical,
                          struct btrfs_io_geometry *io_geom);
 int btrfs_read_sys_array(struct btrfs_fs_info *fs_info);
 int btrfs_read_chunk_tree(struct btrfs_fs_info *fs_info);