if (IS_ERR(map))
return -EIO;
- data_stripe_length = map->stripe_size;
+ data_stripe_length = map->dev_extent_size;
io_stripe_size = BTRFS_STRIPE_LEN;
chunk_start = map->start;
dev_offset = map->stripes[i].physical;
ret = insert_dev_extent(trans, device, chunk_offset, dev_offset,
- map->stripe_size);
+ map->dev_extent_size);
if (ret)
break;
}
struct btrfs_device *device = stripe->dev;
btrfs_set_extent_bit(&device->alloc_state, stripe->physical,
- stripe->physical + map->stripe_size - 1,
+ stripe->physical + map->dev_extent_size - 1,
bits | EXTENT_NOWAIT, NULL);
}
}
struct btrfs_device *device = stripe->dev;
btrfs_clear_extent_bit(&device->alloc_state, stripe->physical,
- stripe->physical + map->stripe_size - 1,
+ stripe->physical + map->dev_extent_size - 1,
bits | EXTENT_NOWAIT, NULL);
}
}
map->start = start;
map->chunk_len = ctl->chunk_size;
- map->stripe_size = ctl->stripe_size;
+ map->dev_extent_size = ctl->stripe_size;
map->on_disk_type = type;
map->sub_stripes = ctl->sub_stripes;
map->num_stripes = ctl->num_stripes;
devid, uuid);
}
-u64 btrfs_calc_stripe_length(const struct btrfs_chunk_map *map)
+u64 btrfs_calc_dev_extent_size(const struct btrfs_chunk_map *map)
{
const int data_stripes = calc_data_stripes(map->type, map->num_stripes);
set_real_chunk_type(map);
if (num_stripes > 0)
- map->stripe_size = btrfs_calc_stripe_length(map);
+ map->dev_extent_size = btrfs_calc_dev_extent_size(map);
else
- map->stripe_size = 0;
+ map->dev_extent_size = 0;
for (i = 0; i < num_stripes; i++) {
map->stripes[i].physical =
struct btrfs_dev_lookup_args args = { .devid = devid };
struct btrfs_chunk_map *map;
struct btrfs_device *dev;
- u64 stripe_len;
+ u64 dev_extent_size;
bool found = false;
int ret = 0;
int i;
goto out;
}
- stripe_len = btrfs_calc_stripe_length(map);
- if (unlikely(physical_len != stripe_len)) {
+ dev_extent_size = btrfs_calc_dev_extent_size(map);
+ if (unlikely(physical_len != dev_extent_size)) {
btrfs_err(fs_info,
"dev extent physical offset %llu on devid %llu length doesn't match chunk %llu, have %llu expect %llu",
physical_offset, devid, map->start, physical_len,
- stripe_len);
+ dev_extent_size);
ret = -EUCLEAN;
goto out;
}
refcount_t refs;
u64 start;
u64 chunk_len;
- u64 stripe_size;
+ u64 dev_extent_size;
/*
* The real type that is utilized during logical address mapping.
*
void btrfs_free_device(struct btrfs_device *device);
unsigned long btrfs_full_stripe_len(struct btrfs_fs_info *fs_info,
u64 logical);
-u64 btrfs_calc_stripe_length(const struct btrfs_chunk_map *map);
+u64 btrfs_calc_dev_extent_size(const struct btrfs_chunk_map *map);
int btrfs_nr_parity_stripes(u64 type);
int btrfs_chunk_alloc_add_chunk_item(struct btrfs_trans_handle *trans,
struct btrfs_block_group *bg);