Lines Matching defs:logical
226 u64 logical, u64 *length,
2978 * btrfs_get_chunk_map() - Find the mapping containing the given logical extent.
2979 * @logical: Logical block offset in bytes.
2985 u64 logical, u64 length)
2992 em = lookup_extent_mapping(em_tree, logical, length);
2997 "unable to find chunk map for logical %llu length %llu",
2998 logical, length);
3002 if (em->start > logical || em->start + em->len <= logical) {
3005 logical, logical + length, em->start, em->start + em->len);
5097 * really going to be in terms of logical address space, and compare
5481 int btrfs_num_copies(struct btrfs_fs_info *fs_info, u64 logical, u64 len)
5487 em = btrfs_get_chunk_map(fs_info, logical, len);
5527 u64 logical)
5533 em = btrfs_get_chunk_map(fs_info, logical, len);
5544 int btrfs_is_parity_mirror(struct btrfs_fs_info *fs_info, u64 logical, u64 len)
5550 em = btrfs_get_chunk_map(fs_info, logical, len);
5674 u64 logical, u64 *length_ret,
5701 em = btrfs_get_chunk_map(fs_info, logical, length);
5712 offset = logical - em->start;
5713 length = min_t(u64, em->start + em->len - logical, length);
5836 u64 logical, u64 length,
5849 logical, &length, &bbio, 0, 0);
6004 * @logical - address that we want to figure out the geometry of
6005 * @len - the length of IO we are going to perform, starting at @logical
6009 * Returns < 0 in case a chunk for the given logical address cannot be found,
6010 * usually shouldn't happen unless @logical is corrupted, 0 otherwise.
6013 u64 logical, u64 len, struct btrfs_io_geometry *io_geom)
6027 em = btrfs_get_chunk_map(fs_info, logical, len);
6032 /* Offset of this logical address in the chunk */
6033 offset = logical - em->start;
6042 "stripe math has gone wrong, stripe_offset=%llu offset=%llu start=%llu logical=%llu stripe_len=%llu",
6043 stripe_offset, offset, em->start, logical, stripe_len);
6100 u64 logical, u64 *length,
6128 ret = btrfs_get_io_geometry(fs_info, op, logical, *length, &geom);
6132 em = btrfs_get_chunk_map(fs_info, logical, *length);
6154 ret = get_extra_mirror_from_replace(fs_info, logical, *length,
6290 /* Fill in the logical address of each stripe */
6341 u64 logical, u64 *length,
6345 return __btrfs_map_block_for_discard(fs_info, logical,
6348 return __btrfs_map_block(fs_info, op, logical, length, bbio_ret,
6354 u64 logical, u64 *length,
6357 return __btrfs_map_block(fs_info, op, logical, length, bbio_ret, 0, 1);
6445 static void bbio_error(struct btrfs_bio *bbio, struct bio *bio, u64 logical)
6453 bio->bi_iter.bi_sector = logical >> 9;
6467 u64 logical = (u64)bio->bi_iter.bi_sector << 9;
6479 ret = __btrfs_map_block(fs_info, btrfs_op(bio), logical,
6511 "mapping failed logical %llu bio len %llu len %llu",
6512 logical, length, map_length);
6522 bbio_error(bbio, first_bio, logical);
6687 u64 logical;
6695 logical = key->offset;
6704 ret = btrfs_check_chunk_valid(leaf, chunk, logical);
6710 em = lookup_extent_mapping(map_tree, logical, 1);
6714 if (em && em->start <= logical && em->start + em->len > logical) {
6732 em->start = logical;