On 08/08/2017 03:28 AM, Kevin Wolf wrote:
> Am 07.08.2017 um 22:30 hat Eric Blake geschrieben:
>> This also requires changing the return type of get_cluster_offset()
>> and adjusting all callers.
>> Use osdep.h macros instead of open-coded rounding while in the
>> area.
>> Reported-by: Markus Armbruster <arm...@redhat.com>
>> Signed-off-by: Eric Blake <ebl...@redhat.com>
>> ---

> qcow2 ended up with this prototype:
> int qcow2_get_cluster_offset(BlockDriverState *bs, uint64_t offset,
>                              unsigned int *bytes, uint64_t *cluster_offset)
> Separating a full uin64_t offset by-reference parameter and an 0/-errno
> status return code feels a little cleaner to me.
> And in fact, it's not only cleaner, but bit 63 is QCOW_OFLAG_COMPRESSED,
> so this patch breaks compressed images.

Looks like I'll be sending a v2, then.

Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to