btrfs: Remove devid parameter from btrfs_rmap_block
authorNikolay Borisov <nborisov@suse.com>
Fri, 4 May 2018 07:53:05 +0000 (10:53 +0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 28 May 2018 16:07:29 +0000 (18:07 +0200)
This function is used in only one place and devid argument is always
passed 0. So just remove it, similarly to how it was removed in the
userspace code.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent-tree.c
fs/btrfs/volumes.c
fs/btrfs/volumes.h

index 38dd98bc50d7db3df09401ba8e2331d71de9c176..f206f1a65cc1a61eef2c487079ac26998b293096 100644 (file)
@@ -256,7 +256,7 @@ static int exclude_super_stripes(struct btrfs_fs_info *fs_info,
        for (i = 0; i < BTRFS_SUPER_MIRROR_MAX; i++) {
                bytenr = btrfs_sb_offset(i);
                ret = btrfs_rmap_block(fs_info, cache->key.objectid,
-                                      bytenr, 0, &logical, &nr, &stripe_len);
+                                      bytenr, &logical, &nr, &stripe_len);
                if (ret)
                        return ret;
 
index 78f6cd1de33aca95a555ca19961f3da39fb6f3d7..45227c83b7427d230f62a67f146c12c52d73fa9a 100644 (file)
@@ -5975,9 +5975,8 @@ int btrfs_map_sblock(struct btrfs_fs_info *fs_info, enum btrfs_map_op op,
        return __btrfs_map_block(fs_info, op, logical, length, bbio_ret, 0, 1);
 }
 
-int btrfs_rmap_block(struct btrfs_fs_info *fs_info,
-                    u64 chunk_start, u64 physical, u64 devid,
-                    u64 **logical, int *naddrs, int *stripe_len)
+int btrfs_rmap_block(struct btrfs_fs_info *fs_info, u64 chunk_start,
+                    u64 physical, u64 **logical, int *naddrs, int *stripe_len)
 {
        struct extent_map *em;
        struct map_lookup *map;
@@ -6009,8 +6008,6 @@ int btrfs_rmap_block(struct btrfs_fs_info *fs_info,
        BUG_ON(!buf); /* -ENOMEM */
 
        for (i = 0; i < map->num_stripes; i++) {
-               if (devid && map->stripes[i].dev->devid != devid)
-                       continue;
                if (map->stripes[i].physical > physical ||
                    map->stripes[i].physical + length <= physical)
                        continue;
index 3a6dbbce650a2c21a2fc0fb415d8a0697c70579e..39787a2f5fb45dd6ad74f856ac22bde36a859027 100644 (file)
@@ -394,9 +394,8 @@ int btrfs_map_block(struct btrfs_fs_info *fs_info, enum btrfs_map_op op,
 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_rmap_block(struct btrfs_fs_info *fs_info,
-                    u64 chunk_start, u64 physical, u64 devid,
-                    u64 **logical, int *naddrs, int *stripe_len);
+int btrfs_rmap_block(struct btrfs_fs_info *fs_info, u64 chunk_start,
+                    u64 physical, u64 **logical, int *naddrs, int *stripe_len);
 int btrfs_read_sys_array(struct btrfs_fs_info *fs_info);
 int btrfs_read_chunk_tree(struct btrfs_fs_info *fs_info);
 int btrfs_alloc_chunk(struct btrfs_trans_handle *trans,