/external/qemu/block/ |
qcow2-cluster.c | 111 * seek l2_offset in the l2_cache table 120 static uint64_t *seek_l2_table(BDRVQcowState *s, uint64_t l2_offset) 125 if (l2_offset == s->l2_cache_offsets[i]) { 148 static uint64_t *l2_load(BlockDriverState *bs, uint64_t l2_offset) 156 l2_table = seek_l2_table(s, l2_offset); 164 if (bdrv_pread(s->hd, l2_offset, l2_table, s->l2_size * sizeof(uint64_t)) != 167 s->l2_cache_offsets[min_index] = l2_offset; 213 uint64_t *l2_table, l2_offset; local 219 l2_offset = qcow2_alloc_clusters(bs, s->l2_size * sizeof(uint64_t)); 223 s->l1_table[l1_index] = l2_offset | QCOW_OFLAG_COPIED 399 uint64_t l2_offset, *l2_table, cluster_offset; local 487 uint64_t l2_offset, *l2_table; local 546 uint64_t l2_offset, *l2_table, cluster_offset; local 608 uint64_t *old_cluster, start_sect, l2_offset, *l2_table; local 685 uint64_t l2_offset, *l2_table, cluster_offset; local [all...] |
qcow2-refcount.c | 469 uint64_t *l1_table, *l2_table, l2_offset, offset, l1_size2, l1_allocated; local 497 l2_offset = l1_table[i]; 498 if (l2_offset) { 499 old_l2_offset = l2_offset; 500 l2_offset &= ~QCOW_OFLAG_COPIED; 502 if (bdrv_pread(s->hd, l2_offset, l2_table, l2_size) != l2_size) 536 l2_offset, l2_table, l2_size) != l2_size) 541 refcount = update_cluster_refcount(bs, l2_offset >> s->cluster_bits, addend); 543 refcount = get_refcount(bs, l2_offset >> s->cluster_bits); 546 l2_offset |= QCOW_OFLAG_COPIED 721 uint64_t *l1_table, l2_offset, l1_size2; local [all...] |
qcow.c | 263 uint64_t l2_offset, *l2_table, cluster_offset, tmp; local 268 l2_offset = s->l1_table[l1_index]; 270 if (!l2_offset) { 274 l2_offset = bdrv_getlength(s->hd); 276 l2_offset = (l2_offset + s->cluster_size - 1) & ~(s->cluster_size - 1); 278 s->l1_table[l1_index] = l2_offset; 279 tmp = cpu_to_be64(l2_offset); 286 if (l2_offset == s->l2_cache_offsets[i]) { 309 if (bdrv_pwrite(s->hd, l2_offset, l2_table, s->l2_size * sizeof(uint64_t)) ! [all...] |
vmdk.c | 86 unsigned int l2_offset; member in struct:VmdkMetaData 494 if (bdrv_pwrite(s->hd, ((int64_t)m_data->l2_offset * 512) + (m_data->l2_index * sizeof(m_data->offset)), 499 m_data->l2_offset = s->l1_backup_table[m_data->l1_index]; 500 if (bdrv_pwrite(s->hd, ((int64_t)m_data->l2_offset * 512) + (m_data->l2_index * sizeof(m_data->offset)), 512 unsigned int l1_index, l2_offset, l2_index; local 523 l2_offset = s->l1_table[l1_index]; 524 if (!l2_offset) 527 if (l2_offset == s->l2_cache_offsets[i]) { 548 if (bdrv_pread(s->hd, (int64_t)l2_offset * 512, l2_table, s->l2_size * sizeof(uint32_t)) != 552 s->l2_cache_offsets[min_index] = l2_offset; [all...] |