Lines Matching refs:cluster_offset

539 do_perform_cow_write(BlockDriverState *bs, uint64_t cluster_offset,  in do_perform_cow_write()  argument
550 cluster_offset + offset_in_cluster, qiov->size, true); in do_perform_cow_write()
556 ret = bdrv_co_pwritev(s->data_file, cluster_offset + offset_in_cluster, in do_perform_cow_write()
834 int64_t cluster_offset; in qcow2_alloc_compressed_cluster_offset() local
848 cluster_offset = get_l2_entry(s, l2_slice, l2_index); in qcow2_alloc_compressed_cluster_offset()
849 if (cluster_offset & L2E_OFFSET_MASK) { in qcow2_alloc_compressed_cluster_offset()
854 cluster_offset = qcow2_alloc_bytes(bs, compressed_size); in qcow2_alloc_compressed_cluster_offset()
855 if (cluster_offset < 0) { in qcow2_alloc_compressed_cluster_offset()
857 return cluster_offset; in qcow2_alloc_compressed_cluster_offset()
861 (cluster_offset + compressed_size - 1) / QCOW2_COMPRESSED_SECTOR_SIZE - in qcow2_alloc_compressed_cluster_offset()
862 (cluster_offset / QCOW2_COMPRESSED_SECTOR_SIZE); in qcow2_alloc_compressed_cluster_offset()
865 assert((cluster_offset & s->cluster_offset_mask) == cluster_offset); in qcow2_alloc_compressed_cluster_offset()
868 cluster_offset |= QCOW_OFLAG_COMPRESSED | in qcow2_alloc_compressed_cluster_offset()
877 set_l2_entry(s, l2_slice, l2_index, cluster_offset); in qcow2_alloc_compressed_cluster_offset()
883 *host_offset = cluster_offset & s->cluster_offset_mask; in qcow2_alloc_compressed_cluster_offset()
1034 uint64_t cluster_offset = m->alloc_offset; in qcow2_alloc_cluster_link_l2() local
1070 uint64_t offset = cluster_offset + ((uint64_t)i << s->cluster_bits); in qcow2_alloc_cluster_link_l2()
1500 uint64_t l2_entry, cluster_offset; in handle_copied() local
1531 cluster_offset = l2_entry & L2E_OFFSET_MASK; in handle_copied()
1534 if (offset_into_cluster(s, cluster_offset)) { in handle_copied()
1539 cluster_offset, guest_offset); in handle_copied()
1545 if (*host_offset != INV_OFFSET && cluster_offset != *host_offset) { in handle_copied()
1561 ret = calculate_l2_meta(bs, cluster_offset, guest_offset, in handle_copied()
1579 *host_offset = cluster_offset + offset_into_cluster(s, guest_offset); in handle_copied()
1623 int64_t cluster_offset = in do_alloc_cluster_offset() local
1625 if (cluster_offset < 0) { in do_alloc_cluster_offset()
1626 return cluster_offset; in do_alloc_cluster_offset()
1628 *host_offset = cluster_offset; in do_alloc_cluster_offset()
1790 uint64_t cluster_offset; in qcow2_alloc_host_offset() local
1799 cluster_offset = INV_OFFSET; in qcow2_alloc_host_offset()
1806 if (*host_offset == INV_OFFSET && cluster_offset != INV_OFFSET) { in qcow2_alloc_host_offset()
1807 *host_offset = cluster_offset; in qcow2_alloc_host_offset()
1815 if (cluster_offset != INV_OFFSET) { in qcow2_alloc_host_offset()
1816 cluster_offset += cur_bytes; in qcow2_alloc_host_offset()
1863 ret = handle_copied(bs, start, &cluster_offset, &cur_bytes, m); in qcow2_alloc_host_offset()
1876 ret = handle_alloc(bs, start, &cluster_offset, &cur_bytes, m); in qcow2_alloc_host_offset()