Lines Matching refs:l2_entry

395 qcow2_get_subcluster_range_type(BlockDriverState *bs, uint64_t l2_entry,  in qcow2_get_subcluster_range_type()  argument
402 *type = qcow2_get_subcluster_type(bs, l2_entry, l2_bitmap, sc_from); in qcow2_get_subcluster_range_type()
459 uint64_t l2_entry = get_l2_entry(s, l2_slice, *l2_index + i); in count_contiguous_subclusters() local
461 int ret = qcow2_get_subcluster_range_type(bs, l2_entry, l2_bitmap, in count_contiguous_subclusters()
473 expected_offset = l2_entry & L2E_OFFSET_MASK; in count_contiguous_subclusters()
481 if (expected_offset != (l2_entry & L2E_OFFSET_MASK)) { in count_contiguous_subclusters()
592 uint64_t l1_index, l2_offset, *l2_slice, l2_entry, l2_bitmap; in qcow2_get_host_offset() local
647 l2_entry = get_l2_entry(s, l2_slice, l2_index); in qcow2_get_host_offset()
656 type = qcow2_get_subcluster_type(bs, l2_entry, l2_bitmap, sc_index); in qcow2_get_host_offset()
677 *host_offset = l2_entry; in qcow2_get_host_offset()
685 uint64_t host_cluster_offset = l2_entry & L2E_OFFSET_MASK; in qcow2_get_host_offset()
1166 uint64_t l2_entry, l2_bitmap; in calculate_l2_meta() local
1180 l2_entry = get_l2_entry(s, l2_slice, l2_index + i); in calculate_l2_meta()
1187 int cnt = qcow2_get_subcluster_range_type(bs, l2_entry, l2_bitmap, in calculate_l2_meta()
1195 type = qcow2_get_subcluster_type(bs, l2_entry, l2_bitmap, 0); in calculate_l2_meta()
1213 l2_entry = get_l2_entry(s, l2_slice, l2_index); in calculate_l2_meta()
1216 type = qcow2_get_subcluster_type(bs, l2_entry, l2_bitmap, sc_index); in calculate_l2_meta()
1258 l2_entry = get_l2_entry(s, l2_slice, l2_index); in calculate_l2_meta()
1261 type = qcow2_get_subcluster_type(bs, l2_entry, l2_bitmap, sc_index); in calculate_l2_meta()
1333 cluster_needs_new_alloc(BlockDriverState *bs, uint64_t l2_entry) in cluster_needs_new_alloc() argument
1335 switch (qcow2_get_cluster_type(bs, l2_entry)) { in cluster_needs_new_alloc()
1338 if (l2_entry & QCOW_OFLAG_COPIED) { in cluster_needs_new_alloc()
1369 uint64_t l2_entry = get_l2_entry(s, l2_slice, l2_index); in count_single_write_clusters() local
1370 uint64_t expected_offset = l2_entry & L2E_OFFSET_MASK; in count_single_write_clusters()
1374 l2_entry = get_l2_entry(s, l2_slice, l2_index + i); in count_single_write_clusters()
1375 if (cluster_needs_new_alloc(bs, l2_entry) != new_alloc) { in count_single_write_clusters()
1379 if (expected_offset != (l2_entry & L2E_OFFSET_MASK)) { in count_single_write_clusters()
1500 uint64_t l2_entry, cluster_offset; in handle_copied() local
1530 l2_entry = get_l2_entry(s, l2_slice, l2_index); in handle_copied()
1531 cluster_offset = l2_entry & L2E_OFFSET_MASK; in handle_copied()
1533 if (!cluster_needs_new_alloc(bs, l2_entry)) { in handle_copied()
1537 PRIx64 ")", l2_entry & QCOW_OFLAG_ZERO ? in handle_copied()
2321 uint64_t l2_entry = get_l2_entry(s, l2_slice, j); in expand_zero_clusters_in_l1() local
2322 int64_t offset = l2_entry & L2E_OFFSET_MASK; in expand_zero_clusters_in_l1()
2324 qcow2_get_cluster_type(bs, l2_entry); in expand_zero_clusters_in_l1()
2549 void qcow2_parse_compressed_l2_entry(BlockDriverState *bs, uint64_t l2_entry, in qcow2_parse_compressed_l2_entry() argument
2555 assert(qcow2_get_cluster_type(bs, l2_entry) == QCOW2_CLUSTER_COMPRESSED); in qcow2_parse_compressed_l2_entry()
2557 *coffset = l2_entry & s->cluster_offset_mask; in qcow2_parse_compressed_l2_entry()
2559 nb_csectors = ((l2_entry >> s->csize_shift) & s->csize_mask) + 1; in qcow2_parse_compressed_l2_entry()