Lines Matching full:uint64_t
35 uint64_t *new_l1_table;
52 new_l1_size2 = sizeof(uint64_t) * new_l1_size;
54 memcpy(new_l1_table, s->l1_table, s->l1_size * sizeof(uint64_t));
76 cpu_to_be64w((uint64_t*)(data + 4), new_l1_table_offset);
82 qcow2_free_clusters(bs, s->l1_table_offset, s->l1_size * sizeof(uint64_t));
97 memset(s->l2_cache, 0, s->l2_size * L2_CACHE_SIZE * sizeof(uint64_t));
98 memset(s->l2_cache_offsets, 0, L2_CACHE_SIZE * sizeof(uint64_t));
132 static uint64_t *seek_l2_table(BDRVQcowState *s, uint64_t l2_offset)
160 static int l2_load(BlockDriverState *bs, uint64_t l2_offset,
161 uint64_t **l2_table)
181 s->l2_size * sizeof(uint64_t));
200 uint64_t buf[L1_ENTRIES_PER_SECTOR];
229 static int l2_allocate(BlockDriverState *bs, int l1_index, uint64_t **table)
233 uint64_t old_l2_offset;
234 uint64_t *l2_table;
242 l2_offset = qcow2_alloc_clusters(bs, s->l2_size * sizeof(uint64_t));
254 memset(l2_table, 0, s->l2_size * sizeof(uint64_t));
259 s->l2_size * sizeof(uint64_t));
267 s->l2_size * sizeof(uint64_t));
293 static int count_contiguous_clusters(uint64_t nb_clusters, int cluster_size,
294 uint64_t *l2_table, uint64_t start, uint64_t mask)
297 uint64_t offset = be64_to_cpu(l2_table[0]) & ~mask;
303 if (offset + (uint64_t) i * cluster_size != (be64_to_cpu(l2_table[i]) & ~mask))
309 static int count_contiguous_free_clusters(uint64_t nb_clusters, uint64_t *l2_table)
328 uint64_t ll[2];
350 uint64_t cluster_offset;
396 static int copy_sectors(BlockDriverState *bs, uint64_t start_sect,
397 uint64_t cluster_offset, int n_start, int n_end)
440 int qcow2_get_cluster_offset(BlockDriverState *bs, uint64_t offset,
441 int *num, uint64_t *cluster_offset)
445 uint64_t l2_offset, *l2_table;
448 uint64_t nb_available, nb_needed;
530 static int get_cluster_table(BlockDriverState *bs, uint64_t offset,
531 uint64_t **new_l2_table,
532 uint64_t *new_l2_offset,
537 uint64_t l2_offset;
538 uint64_t *l2_table = NULL;
563 uint64_t));
595 uint64_t qcow2_alloc_compressed_cluster_offset(BlockDriverState *bs,
596 uint64_t offset,
601 uint64_t l2_offset, *l2_table;
626 ((uint64_t)nb_csectors << s->csize_shift);
635 l2_offset + l2_index * sizeof(uint64_t),
637 sizeof(uint64_t)) < 0)
648 static int write_l2_entries(BlockDriverState *bs, uint64_t *l2_table,
649 uint64_t l2_offset, int l2_index, int num)
671 uint64_t *old_cluster, start_sect, l2_offset, *l2_table;
672 uint64_t cluster_offset = m->cluster_offset;
677 old_cluster = qemu_malloc(m->nb_clusters * sizeof(uint64_t));
688 uint64_t end = m->nb_available & ~(uint64_t)(s->cluster_sectors - 1);
750 int qcow2_alloc_cluster_offset(BlockDriverState *bs, uint64_t offset,
755 uint64_t l2_offset, *l2_table;
820 uint64_t end_offset = offset + nb_clusters * s->cluster_size;
821 uint64_t old_offset = old_alloc->offset;
822 uint64_t old_end_offset = old_alloc->offset +
900 int qcow2_decompress_cluster(BlockDriverState *bs, uint64_t cluster_offset)
904 uint64_t coffset;