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

2018-10-04 Thread Vladimir Sementsov-Ogievskiy
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-

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

2018-10-03 Thread John Snow
On 10/02/2018 07:33 PM, John Snow wrote: > From: Eric Blake > > We need an accurate count of the number of bits set in a bitmap > after a merge. In particular, since the merge operation short-circuits > a merge from an empty source, if you have bitmaps A, B, and C where > B started empty, then

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

2018-10-03 Thread Eric Blake
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 mak

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

2018-10-03 Thread John Snow
On 10/03/2018 10:49 AM, Eric Blake wrote: > On 10/3/18 9:32 AM, Vladimir Sementsov-Ogievskiy wrote: >> 03.10.2018 02:33, John Snow wrote: >>> From: Eric Blake >>> >>> We need an accurate count of the number of bits set in a bitmap >>> after a merge. In particular, since the merge operation shor

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

2018-10-03 Thread Eric Blake
On 10/3/18 9:32 AM, Vladimir Sementsov-Ogievskiy wrote: 03.10.2018 02:33, John Snow wrote: From: Eric Blake We need an accurate count of the number of bits set in a bitmap after a merge. In particular, since the merge operation short-circuits a merge from an empty source, if you have bitmaps A

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

2018-10-03 Thread Vladimir Sementsov-Ogievskiy
03.10.2018 02:33, John Snow wrote: > From: Eric Blake > > We need an accurate count of the number of bits set in a bitmap > after a merge. In particular, since the merge operation short-circuits > a merge from an empty source, if you have bitmaps A, B, and C where > B started empty, then merge C i

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

2018-10-02 Thread John Snow
From: Eric Blake We need an accurate count of the number of bits set in a bitmap after a merge. In particular, since the merge operation short-circuits a merge from an empty source, if you have bitmaps A, B, and C where B started empty, then merge C into B, and B into A, an inaccurate count meant