diff options
author | Kevin Wolf <kwolf@redhat.com> | 2016-06-02 11:41:52 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2016-06-16 15:19:55 +0200 |
commit | 244483e64ee726cc89a1e05bed2be0ed37071403 (patch) | |
tree | a8b9eb61f5d4f2bcfb50f2ff3ee5af97c5d28307 /include/block/block.h | |
parent | 8c0dcbc4ad2bf4f9f3b27c637b357e87cad70ec7 (diff) | |
download | qemu-244483e64ee726cc89a1e05bed2be0ed37071403.tar.gz qemu-244483e64ee726cc89a1e05bed2be0ed37071403.tar.bz2 qemu-244483e64ee726cc89a1e05bed2be0ed37071403.zip |
block: Byte-based bdrv_co_do_copy_on_readv()
In a first step to convert the common I/O path to work on bytes rather
than sectors, this converts the copy-on-read logic that is used by
bdrv_aligned_preadv().
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include/block/block.h')
-rw-r--r-- | include/block/block.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/block/block.h b/include/block/block.h index 8cabcddf6c..9c3a62cc0a 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -404,10 +404,14 @@ int bdrv_write_compressed(BlockDriverState *bs, int64_t sector_num, const uint8_t *buf, int nb_sectors); int bdrv_get_info(BlockDriverState *bs, BlockDriverInfo *bdi); ImageInfoSpecific *bdrv_get_specific_info(BlockDriverState *bs); +void bdrv_round_sectors_to_clusters(BlockDriverState *bs, + int64_t sector_num, int nb_sectors, + int64_t *cluster_sector_num, + int *cluster_nb_sectors); void bdrv_round_to_clusters(BlockDriverState *bs, - int64_t sector_num, int nb_sectors, - int64_t *cluster_sector_num, - int *cluster_nb_sectors); + int64_t offset, unsigned int bytes, + int64_t *cluster_offset, + unsigned int *cluster_bytes); const char *bdrv_get_encrypted_filename(BlockDriverState *bs); void bdrv_get_backing_filename(BlockDriverState *bs, |