Home
last modified time | relevance | path

Searched refs:l2_table (Results 1 – 4 of 4) sorted by relevance

/external/qemu/block/
Dqcow2-cluster.c152 uint64_t *l2_table; in l2_load() local
156 l2_table = seek_l2_table(s, l2_offset); in l2_load()
157 if (l2_table != NULL) in l2_load()
158 return l2_table; in l2_load()
163 l2_table = s->l2_cache + (min_index << s->l2_bits); in l2_load()
164 if (bdrv_pread(s->hd, l2_offset, l2_table, s->l2_size * sizeof(uint64_t)) != in l2_load()
170 return l2_table; in l2_load()
213 uint64_t *l2_table, l2_offset; in l2_allocate() local
231 l2_table = s->l2_cache + (min_index << s->l2_bits); in l2_allocate()
235 memset(l2_table, 0, s->l2_size * sizeof(uint64_t)); in l2_allocate()
[all …]
Dqcow2-refcount.c469 uint64_t *l1_table, *l2_table, l2_offset, offset, l1_size2, l1_allocated; in qcow2_update_snapshot_refcount() local
475 l2_table = NULL; in qcow2_update_snapshot_refcount()
494 l2_table = qemu_malloc(l2_size); in qcow2_update_snapshot_refcount()
502 if (bdrv_pread(s->hd, l2_offset, l2_table, l2_size) != l2_size) in qcow2_update_snapshot_refcount()
505 offset = be64_to_cpu(l2_table[j]); in qcow2_update_snapshot_refcount()
529 l2_table[j] = cpu_to_be64(offset); in qcow2_update_snapshot_refcount()
536 l2_offset, l2_table, l2_size) != l2_size) in qcow2_update_snapshot_refcount()
565 qemu_free(l2_table); in qcow2_update_snapshot_refcount()
570 qemu_free(l2_table); in qcow2_update_snapshot_refcount()
636 uint64_t *l2_table, offset; in check_refcounts_l2() local
[all …]
Dqcow.c263 uint64_t l2_offset, *l2_table, cluster_offset, tmp; in get_cluster_offset() local
293 l2_table = s->l2_cache + (i << s->l2_bits); in get_cluster_offset()
306 l2_table = s->l2_cache + (min_index << s->l2_bits); in get_cluster_offset()
308 memset(l2_table, 0, s->l2_size * sizeof(uint64_t)); in get_cluster_offset()
309 if (bdrv_pwrite(s->hd, l2_offset, l2_table, s->l2_size * sizeof(uint64_t)) != in get_cluster_offset()
313 if (bdrv_pread(s->hd, l2_offset, l2_table, s->l2_size * sizeof(uint64_t)) != in get_cluster_offset()
321 cluster_offset = be64_to_cpu(l2_table[l2_index]); in get_cluster_offset()
374 l2_table[l2_index] = tmp; in get_cluster_offset()
Dvmdk.c514 uint32_t min_count, *l2_table, tmp = 0; in get_cluster_offset() local
534 l2_table = s->l2_cache + (i * s->l2_size); in get_cluster_offset()
547 l2_table = s->l2_cache + (min_index * s->l2_size); in get_cluster_offset()
548 if (bdrv_pread(s->hd, (int64_t)l2_offset * 512, l2_table, s->l2_size * sizeof(uint32_t)) != in get_cluster_offset()
556 cluster_offset = le32_to_cpu(l2_table[l2_index]); in get_cluster_offset()
568 l2_table[l2_index] = tmp; in get_cluster_offset()