summaryrefslogtreecommitdiff
path: root/volumes.c
diff options
context:
space:
mode:
Diffstat (limited to 'volumes.c')
-rw-r--r--volumes.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/volumes.c b/volumes.c
index c6e34321..9379d2f6 100644
--- a/volumes.c
+++ b/volumes.c
@@ -420,7 +420,7 @@ static int find_free_dev_extent_start(struct btrfs_device *device,
goto out;
}
- path->reada = 2;
+ path->reada = READA_FORWARD;
key.objectid = device->devid;
key.offset = search_start;
@@ -846,7 +846,7 @@ static int btrfs_device_avail_bytes(struct btrfs_trans_handle *trans,
key.offset = root->fs_info->alloc_start;
key.type = BTRFS_DEV_EXTENT_KEY;
- path->reada = 2;
+ path->reada = READA_FORWARD;
ret = btrfs_search_slot(trans, root, &key, path, 0, 0);
if (ret < 0)
goto error;
@@ -1364,9 +1364,8 @@ int btrfs_next_bg(struct btrfs_fs_info *fs_info, u64 *logical,
return -ENOENT;
}
-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 btrfs_mapping_tree *map_tree = &fs_info->mapping_tree;
struct cache_extent *ce;
@@ -1397,8 +1396,6 @@ int btrfs_rmap_block(struct btrfs_fs_info *fs_info,
buf = kzalloc(sizeof(u64) * map->num_stripes, GFP_NOFS);
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;