aboutsummaryrefslogtreecommitdiff
path: root/block/qcow2.h
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2016-05-31 16:13:07 +0200
committerKevin Wolf <kwolf@redhat.com>2016-06-16 15:19:55 +0200
commitecfe186380e6fc3a556dff05b866ca213e277fc7 (patch)
treeaf40bff28dc5d95f4a6c107fb3a59c4863b2caaa /block/qcow2.h
parentb2f65d6b02b7df0a780a974a97f26fbf0e464964 (diff)
downloadqemu-ecfe186380e6fc3a556dff05b866ca213e277fc7.zip
qemu-ecfe186380e6fc3a556dff05b866ca213e277fc7.tar.gz
qemu-ecfe186380e6fc3a556dff05b866ca213e277fc7.tar.bz2
qcow2: Implement .bdrv_co_preadv()
Reading from qcow2 images is now byte granularity. Most of the affected code in qcow2 actually gets simpler with this change. The only exception is encryption, which is fixed on 512 bytes blocks; in order to keep this working, bs->request_alignment is set for encrypted images. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'block/qcow2.h')
-rw-r--r--block/qcow2.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/qcow2.h b/block/qcow2.h
index 7db9795..e2c42d5 100644
--- a/block/qcow2.h
+++ b/block/qcow2.h
@@ -544,7 +544,7 @@ int qcow2_encrypt_sectors(BDRVQcow2State *s, int64_t sector_num,
int nb_sectors, bool enc, Error **errp);
int qcow2_get_cluster_offset(BlockDriverState *bs, uint64_t offset,
- int *num, uint64_t *cluster_offset);
+ unsigned int *bytes, uint64_t *cluster_offset);
int qcow2_alloc_cluster_offset(BlockDriverState *bs, uint64_t offset,
int *num, uint64_t *host_offset, QCowL2Meta **m);
uint64_t qcow2_alloc_compressed_cluster_offset(BlockDriverState *bs,