qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [PATCH v2] bitmap: Update count after a merge


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [Qemu-block] [PATCH v2] bitmap: Update count after a merge
Date: Thu, 4 Oct 2018 12:06:18 +0000

03.10.2018 23:01, Eric Blake wrote:
> On 10/3/18 2:57 PM, John Snow wrote:
>
>>>>     - I always forget to update this field.. We definitely should 
>>>> add some
>>>> generic check on it somewhere, at least in tests.
>>>
>>> My suggestion (in another thread) was to enhance
>>> x-debug-block-dirty-bitmap-sha256 to include 'count' alongside the
>>> checksum, to make it easier to write such tests.
>>>
>>
>> I suppose this is in preference to query-block? It would make it easier.
>
> Well, query-block remains the canonical way for users to access the 
> count, while x-debug-block-dirty-bitmap-sha256 is for debugging only 
> (basically, for our unit tests, as no one outside of qemu will get 
> much use out of it).  But yes, writing a test that uses bitmaps on an 
> unconnected BDS is easier than a test that has to use a named device, 
> since query-block won't list nodes that aren't connected to a named 
> device, and requires a lot more parsing to get at the actual bitmap 
> information in comparison to the debug command directly telling you 
> about a single bitmap.
>

I think the best place is bitmap unit test, which is tests/test-bitmaps, 
and we don't need additional api

-- 
Best regards,
Vladimir


reply via email to

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