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.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org