Home
last modified time | relevance | path

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

/external/qemu/block/
Dqcow2-cluster.c132 static uint64_t *seek_l2_table(BDRVQcowState *s, uint64_t l2_offset) in seek_l2_table() argument
137 if (l2_offset == s->l2_cache_offsets[i]) { in seek_l2_table()
160 static int l2_load(BlockDriverState *bs, uint64_t l2_offset, in l2_load() argument
169 *l2_table = seek_l2_table(s, l2_offset); in l2_load()
180 ret = bdrv_pread(bs->file, l2_offset, *l2_table, in l2_load()
186 s->l2_cache_offsets[min_index] = l2_offset; in l2_load()
235 int64_t l2_offset; in l2_allocate() local
242 l2_offset = qcow2_alloc_clusters(bs, s->l2_size * sizeof(uint64_t)); in l2_allocate()
243 if (l2_offset < 0) { in l2_allocate()
244 return l2_offset; in l2_allocate()
[all …]
Dqcow2-refcount.c749 uint64_t *l1_table, *l2_table, l2_offset, offset, l1_size2, l1_allocated; in qcow2_update_snapshot_refcount() local
781 l2_offset = l1_table[i]; in qcow2_update_snapshot_refcount()
782 if (l2_offset) { in qcow2_update_snapshot_refcount()
783 old_l2_offset = l2_offset; in qcow2_update_snapshot_refcount()
784 l2_offset &= ~QCOW_OFLAG_COPIED; in qcow2_update_snapshot_refcount()
786 if (bdrv_pread(bs->file, l2_offset, l2_table, l2_size) != l2_size) in qcow2_update_snapshot_refcount()
830 l2_offset, l2_table, l2_size) < 0) in qcow2_update_snapshot_refcount()
835 refcount = update_cluster_refcount(bs, l2_offset >> s->cluster_bits, addend); in qcow2_update_snapshot_refcount()
837 refcount = get_refcount(bs, l2_offset >> s->cluster_bits); in qcow2_update_snapshot_refcount()
842 l2_offset |= QCOW_OFLAG_COPIED; in qcow2_update_snapshot_refcount()
[all …]
Dvmdk.c85 unsigned int l2_offset; member
474 …if (bdrv_pwrite_sync(bs->file, ((int64_t)m_data->l2_offset * 512) + (m_data->l2_index * sizeof(m_d… in vmdk_L2update()
479 m_data->l2_offset = s->l1_backup_table[m_data->l1_index]; in vmdk_L2update()
480 …if (bdrv_pwrite_sync(bs->file, ((int64_t)m_data->l2_offset * 512) + (m_data->l2_index * sizeof(m_d… in vmdk_L2update()
492 unsigned int l1_index, l2_offset, l2_index; in get_cluster_offset() local
503 l2_offset = s->l1_table[l1_index]; in get_cluster_offset()
504 if (!l2_offset) in get_cluster_offset()
507 if (l2_offset == s->l2_cache_offsets[i]) { in get_cluster_offset()
528 if (bdrv_pread(bs->file, (int64_t)l2_offset * 512, l2_table, s->l2_size * sizeof(uint32_t)) != in get_cluster_offset()
532 s->l2_cache_offsets[min_index] = l2_offset; in get_cluster_offset()
[all …]
Dqcow.c259 uint64_t l2_offset, *l2_table, cluster_offset, tmp; in get_cluster_offset() local
264 l2_offset = s->l1_table[l1_index]; in get_cluster_offset()
266 if (!l2_offset) { in get_cluster_offset()
270 l2_offset = bdrv_getlength(bs->file); in get_cluster_offset()
272 l2_offset = (l2_offset + s->cluster_size - 1) & ~(s->cluster_size - 1); in get_cluster_offset()
274 s->l1_table[l1_index] = l2_offset; in get_cluster_offset()
275 tmp = cpu_to_be64(l2_offset); in get_cluster_offset()
283 if (l2_offset == s->l2_cache_offsets[i]) { in get_cluster_offset()
306 if (bdrv_pwrite_sync(bs->file, l2_offset, l2_table, in get_cluster_offset()
310 if (bdrv_pread(bs->file, l2_offset, l2_table, s->l2_size * sizeof(uint64_t)) != in get_cluster_offset()
[all …]