qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4 14/17] qcow2: Switch load_bitmap_data() to by


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v4 14/17] qcow2: Switch load_bitmap_data() to byte-based iteration
Date: Thu, 13 Jul 2017 05:59:09 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

On 07/13/2017 04:16 AM, Vladimir Sementsov-Ogievskiy wrote:
> 03.07.2017 18:10, Eric Blake wrote:
>> Now that we have adjusted the majority of the calls this function
>> makes to be byte-based, it is easier to read the code if it makes
>> passes over the image using bytes rather than sectors.
>>
>> Signed-off-by: Eric Blake <address@hidden>
>>
>> ---
>> v4: new patch
>> ---

>>
>> -        if (offset == 0) {
>> +        if (data_offset == 0) {
>>               if (entry & BME_TABLE_ENTRY_FLAG_ALL_ONES) {
>> -                bdrv_dirty_bitmap_deserialize_ones(bitmap,
>> -                                                   sector *
>> BDRV_SECTOR_SIZE,
>> -                                                   count *
>> BDRV_SECTOR_SIZE,
>> +                bdrv_dirty_bitmap_deserialize_ones(bitmap, offset,
>> count,
> 
> The change is that now 3rd parameter may not be aligned by sectors, but
> looks like it should be ok.

Correct - the dirty bitmap automatically widens any non-aligned input
into granularity.

> 
> Reviewed-by: Vladimir Sementsov-Ogievskiy<address@hidden>
> 

I posted a v5 prior to this email, if you want to add your Reviewed-by
on any patches there (I think this patch went unchanged into that
revision, but scripts don't always pick up R-b given on a previous
version of a patch).

-- 
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

[Prev in Thread] Current Thread [Next in Thread]