[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH v22 06/30] block/dirty-bitmap: add
From: |
John Snow |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH v22 06/30] block/dirty-bitmap: add deserialize_ones func |
Date: |
Fri, 30 Jun 2017 13:52:56 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 |
On 06/29/2017 10:01 PM, Eric Blake wrote:
> On 06/29/2017 08:55 PM, Eric Blake wrote:
>> On 06/28/2017 07:05 AM, Vladimir Sementsov-Ogievskiy wrote:
>>> Add bdrv_dirty_bitmap_deserialize_ones() function, which is needed for
>>> qcow2 bitmap loading, to handle unallocated bitmap parts, marked as
>>> all-ones.
>>>
>
>>> + * hbitmap_deserialize_ones
>>> + * @hb: HBitmap to operate on.
>>> + * @start: First bit to restore.
>>> + * @count: Number of bits to restore.
>>
>> This part is accurate (the dirty-bitmap is using an underlying bitmap
>> with "one bit per sector" before my series, afterwards it will be "one
>> bit per byte", remembering that hbitmap really stores only one bit per
>> granularity multiple of the underlying unit), if incomplete (the code
>> asserts that things are aligned, but doesn't document that the caller
>> must pass in aligned values); but again, that's matching the
>> pre-existing deserialize_zeroes code.
>
> Okay, I looked again; the documentation for
> hbitmap_serialization_granularity() has a blanket statement that all
> other hbitmap_serialization_* functions taking a start and count must be
> aligned. Indirect, but at least documented, so I retract my statement
> about the docs being incomplete.
>
If the docs are confusing, please send patches to amend them; the bitmap
code is definitely very confusing at times and I appreciate any and all
insight to make the names, variable and documentation read better to be
more intuitive.
Thanks!
- [Qemu-block] [PATCH v22 02/30] specs/qcow2: do not use wording 'bitmap header', (continued)
- [Qemu-block] [PATCH v22 02/30] specs/qcow2: do not use wording 'bitmap header', Vladimir Sementsov-Ogievskiy, 2017/06/28
- [Qemu-block] [PATCH v22 03/30] hbitmap: improve dirty iter, Vladimir Sementsov-Ogievskiy, 2017/06/28
- [Qemu-block] [PATCH v22 05/30] block: fix bdrv_dirty_bitmap_granularity signature, Vladimir Sementsov-Ogievskiy, 2017/06/28
- [Qemu-block] [PATCH v22 29/30] qmp: block-dirty-bitmap-remove: remove persistent, Vladimir Sementsov-Ogievskiy, 2017/06/28
- [Qemu-block] [PATCH v22 20/30] qcow2: store bitmaps on reopening image as read-only, Vladimir Sementsov-Ogievskiy, 2017/06/28
- [Qemu-block] [PATCH v22 17/30] block: introduce persistent dirty bitmaps, Vladimir Sementsov-Ogievskiy, 2017/06/28
- [Qemu-block] [PATCH v22 06/30] block/dirty-bitmap: add deserialize_ones func, Vladimir Sementsov-Ogievskiy, 2017/06/28
- [Qemu-block] [PATCH v22 13/30] block: new bdrv_reopen_bitmaps_rw interface, Vladimir Sementsov-Ogievskiy, 2017/06/28
[Qemu-block] [PATCH v22 10/30] block/dirty-bitmap: add readonly field to BdrvDirtyBitmap, Vladimir Sementsov-Ogievskiy, 2017/06/28