[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/5] qcow2: Make copy_sectors() byte based
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 3/5] qcow2: Make copy_sectors() byte based |
Date: |
Fri, 3 Jun 2016 13:34:55 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 06/03/2016 11:21 AM, Kevin Wolf wrote:
> This will allow copy on write operations where the overwritten part of
> the cluster is not aligned to sector boundaries.
>
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> block/qcow2-cluster.c | 37 +++++++++++++++++--------------------
> 1 file changed, 17 insertions(+), 20 deletions(-)
>
> diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c
> index 9fb7f9f..5d04eb7 100644
> --- a/block/qcow2-cluster.c
> +++ b/block/qcow2-cluster.c
> @@ -391,21 +391,17 @@ int qcow2_encrypt_sectors(BDRVQcow2State *s, int64_t
> sector_num,
> }
>
> static int coroutine_fn copy_sectors(BlockDriverState *bs,
> - uint64_t start_sect,
> + uint64_t src_cluster_offset,
> uint64_t cluster_offset,
> - int n_start, int n_end)
> + int offset_in_cluster,
> + int bytes)
Do we still want this named copy_sectors(), now that it can copy a
sub-sector (well, when not encrypted)?
Otherwise,
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH 0/5] qcow2: Implement .bdrv_co_preadv/pwritev, Kevin Wolf, 2016/06/03
- [Qemu-devel] [PATCH 1/5] qcow2: Work with bytes in qcow2_get_cluster_offset(), Kevin Wolf, 2016/06/03
- [Qemu-devel] [PATCH 4/5] qcow2: Use bytes instead of sectors for QCowL2Meta, Kevin Wolf, 2016/06/03
- [Qemu-devel] [PATCH 3/5] qcow2: Make copy_sectors() byte based, Kevin Wolf, 2016/06/03
- Re: [Qemu-devel] [PATCH 3/5] qcow2: Make copy_sectors() byte based,
Eric Blake <=
- [Qemu-devel] [PATCH 2/5] qcow2: Implement .bdrv_co_preadv(), Kevin Wolf, 2016/06/03
- [Qemu-devel] [PATCH 5/5] qcow2: Implement .bdrv_co_pwritev, Kevin Wolf, 2016/06/03