Home
last modified time | relevance | path

Searched refs:cluster_offset (Results 1 – 6 of 6) sorted by relevance

/external/qemu/block/
Dqcow2-cluster.c314 uint64_t cluster_offset; in qcow_read() local
318 cluster_offset = qcow2_get_cluster_offset(bs, sector_num << 9, &n); in qcow_read()
320 if (!cluster_offset) { in qcow_read()
332 } else if (cluster_offset & QCOW_OFLAG_COMPRESSED) { in qcow_read()
333 if (qcow2_decompress_cluster(s, cluster_offset) < 0) in qcow_read()
337 ret = bdrv_pread(s->hd, cluster_offset + index_in_cluster * 512, buf, n * 512); in qcow_read()
353 uint64_t cluster_offset, int n_start, int n_end) in copy_sectors() argument
370 ret = bdrv_write(s->hd, (cluster_offset >> 9) + n_start, in copy_sectors()
399 uint64_t l2_offset, *l2_table, cluster_offset; in qcow2_get_cluster_offset() local
422 cluster_offset = 0; in qcow2_get_cluster_offset()
[all …]
Dqcow.c79 static int decompress_cluster(BDRVQcowState *s, uint64_t cluster_offset);
263 uint64_t l2_offset, *l2_table, cluster_offset, tmp; in get_cluster_offset() local
321 cluster_offset = be64_to_cpu(l2_table[l2_index]); in get_cluster_offset()
322 if (!cluster_offset || in get_cluster_offset()
323 ((cluster_offset & QCOW_OFLAG_COMPRESSED) && allocate == 1)) { in get_cluster_offset()
327 if ((cluster_offset & QCOW_OFLAG_COMPRESSED) && in get_cluster_offset()
332 if (decompress_cluster(s, cluster_offset) < 0) in get_cluster_offset()
334 cluster_offset = bdrv_getlength(s->hd); in get_cluster_offset()
335 cluster_offset = (cluster_offset + s->cluster_size - 1) & in get_cluster_offset()
338 if (bdrv_pwrite(s->hd, cluster_offset, s->cluster_cache, s->cluster_size) != in get_cluster_offset()
[all …]
Dqcow2-refcount.c239 int64_t start, last, cluster_offset; in update_refcount() local
252 for(cluster_offset = start; cluster_offset <= last; in update_refcount()
253 cluster_offset += s->cluster_size) in update_refcount()
256 int64_t cluster_index = cluster_offset >> s->cluster_bits; in update_refcount()
369 int64_t offset, cluster_offset; in qcow2_alloc_bytes() local
390 cluster_offset = s->free_byte_offset & ~(s->cluster_size - 1); in qcow2_alloc_bytes()
391 if ((cluster_offset + s->cluster_size) == offset) { in qcow2_alloc_bytes()
418 uint64_t cluster_offset, int nb_clusters) in qcow2_free_any_clusters() argument
424 if (cluster_offset & QCOW_OFLAG_COMPRESSED) { in qcow2_free_any_clusters()
426 nb_csectors = ((cluster_offset >> s->csize_shift) & in qcow2_free_any_clusters()
[all …]
Dvmdk.c92 uint64_t cluster_offset; // current write offset member
458 static int get_whole_cluster(BlockDriverState *bs, uint64_t cluster_offset, in get_whole_cluster() argument
482 …if (bdrv_pwrite(act_s->hd, activeBDRV.cluster_offset << 9, whole_grain, sizeof(whole_grain)) != si… in get_whole_cluster()
515 uint64_t cluster_offset; in get_cluster_offset() local
556 cluster_offset = le32_to_cpu(l2_table[l2_index]); in get_cluster_offset()
558 if (!cluster_offset) { in get_cluster_offset()
563 cluster_offset = bdrv_getlength(s->hd); in get_cluster_offset()
564 bdrv_truncate(s->hd, cluster_offset + (s->cluster_sectors << 9)); in get_cluster_offset()
566 cluster_offset >>= 9; in get_cluster_offset()
567 tmp = cpu_to_le32(cluster_offset); in get_cluster_offset()
[all …]
Dqcow2.c314 uint64_t cluster_offset; in qcow_is_allocated() local
317 cluster_offset = qcow2_get_cluster_offset(bs, sector_num << 9, pnum); in qcow_is_allocated()
319 return (cluster_offset != 0); in qcow_is_allocated()
345 uint64_t cluster_offset; member
402 if (!acb->cluster_offset) { in qcow_aio_read_cb()
404 } else if (acb->cluster_offset & QCOW_OFLAG_COMPRESSED) { in qcow_aio_read_cb()
426 acb->cluster_offset = in qcow_aio_read_cb()
430 if (!acb->cluster_offset) { in qcow_aio_read_cb()
456 } else if (acb->cluster_offset & QCOW_OFLAG_COMPRESSED) { in qcow_aio_read_cb()
458 if (qcow2_decompress_cluster(s, acb->cluster_offset) < 0) in qcow_aio_read_cb()
[all …]
Dqcow2.h163 uint64_t cluster_offset, int nb_clusters);
175 int qcow2_decompress_cluster(BDRVQcowState *s, uint64_t cluster_offset);
191 int qcow2_alloc_cluster_link_l2(BlockDriverState *bs, uint64_t cluster_offset,