[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH v7 11/20] dirty-bitmap: Change bdrv
From: |
Eric Blake |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH v7 11/20] dirty-bitmap: Change bdrv_dirty_iter_next() to report byte offset |
Date: |
Thu, 14 Sep 2017 06:58:33 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 09/13/2017 07:15 PM, John Snow wrote:
>
>
> On 09/12/2017 04:31 PM, Eric Blake wrote:
>> Thanks to recent cleanups, most callers were scaling a return value
>> of sectors into bytes (the exception, in qcow2-bitmap, will be
>> converted to byte-based iteration later). Update the interface to
>> do the scaling internally instead.
>>
>> In qcow2-bitmap, the code was specifically checking for an error
>> to be -1; it is more robust to treat all negative values as an
>> error, but at the same time it is also easy enough to ensure we
>> return -1 (and not -512) on error.
>>
>> Signed-off-by: Eric Blake <address@hidden>
>>
>
> This patch now smells like a bugfix and a separate incremental feature
> enhancement.
There is no bug without this patch; more of a fix to avoid a latent
regression from happening in further changes. In v6, I (accidentally)
had bdrv_dirty_iter_next() temporarily returning -512 instead of -1 on
failure; changing the qcow2 code to treat all negatives instead of
precisely -1 as error is enough to avoid that regression, but so also is
fixing bdrv_dirty_iter_next() to always return -1 on failure. This
patch does both, rather than either fix in isolation, but that means we
don't need a backport.
>
> Do we need to backport the error-checking to a possible 2.10.1?
>
> If no:
>
> Reviewed-by: John Snow <address@hidden>
>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-block] [PATCH v7 06/20] dirty-bitmap: Change bdrv_dirty_bitmap_size() to report bytes, (continued)
- [Qemu-block] [PATCH v7 06/20] dirty-bitmap: Change bdrv_dirty_bitmap_size() to report bytes, Eric Blake, 2017/09/12
- [Qemu-block] [PATCH v7 04/20] dirty-bitmap: Drop unused functions, Eric Blake, 2017/09/12
- [Qemu-block] [PATCH v7 07/20] dirty-bitmap: Track bitmap size by bytes, Eric Blake, 2017/09/12
- [Qemu-block] [PATCH v7 08/20] dirty-bitmap: Change bdrv_dirty_bitmap_*serialize*() to take bytes, Eric Blake, 2017/09/12
- [Qemu-block] [PATCH v7 09/20] qcow2: Switch sectors_covered_by_bitmap_cluster() to byte-based, Eric Blake, 2017/09/12
- [Qemu-block] [PATCH v7 10/20] dirty-bitmap: Set iterator start by offset, not sector, Eric Blake, 2017/09/12
- [Qemu-block] [PATCH v7 11/20] dirty-bitmap: Change bdrv_dirty_iter_next() to report byte offset, Eric Blake, 2017/09/12
- [Qemu-block] [PATCH v7 12/20] dirty-bitmap: Change bdrv_get_dirty_count() to report bytes, Eric Blake, 2017/09/12
- [Qemu-block] [PATCH v7 13/20] dirty-bitmap: Change bdrv_get_dirty_locked() to take bytes, Eric Blake, 2017/09/12
- [Qemu-block] [PATCH v7 14/20] dirty-bitmap: Change bdrv_[re]set_dirty_bitmap() to use bytes, Eric Blake, 2017/09/12
- [Qemu-block] [PATCH v7 15/20] mirror: Switch mirror_dirty_init() to byte-based iteration, Eric Blake, 2017/09/12
- [Qemu-block] [PATCH v7 16/20] qcow2: Switch qcow2_measure() to byte-based iteration, Eric Blake, 2017/09/12
- [Qemu-block] [PATCH v7 17/20] qcow2: Switch load_bitmap_data() to byte-based iteration, Eric Blake, 2017/09/12
- [Qemu-block] [PATCH v7 18/20] qcow2: Switch store_bitmap_data() to byte-based iteration, Eric Blake, 2017/09/12
- [Qemu-block] [PATCH v7 19/20] dirty-bitmap: Switch bdrv_set_dirty() to bytes, Eric Blake, 2017/09/12