On 07/05/2018 02:55 PM, Eric Blake wrote:
> On 07/05/2018 01:51 PM, John Snow wrote:
>
>>
>>> - assert(!bdrv_dirty_bitmap_readonly(dest));
>>> -
>>> - if (!hbitmap_merge(dest->bitmap, src->bitmap)) {
>>> - error_setg(errp, "Bitmaps are incompatible and can't be
>>> merged");
>>> +
On 07/05/2018 01:51 PM, John Snow wrote:
-assert(!bdrv_dirty_bitmap_readonly(dest));
-
-if (!hbitmap_merge(dest->bitmap, src->bitmap)) {
-error_setg(errp, "Bitmaps are incompatible and can't be merged");
+if (bdrv_can_merge_dirty_bitmap(dest, src, errp)) {
+bool ret
On 07/03/2018 06:53 AM, Vladimir Sementsov-Ogievskiy wrote:
> Separate can_merge, to reuse it for transaction support for merge
> command.
>
> Also, switch some asserts to errors.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy
> ---
> include/block/dirty-bitmap.h | 3 +++
> include/qemu/hb
On 07/03/2018 05:53 AM, Vladimir Sementsov-Ogievskiy wrote:
In the subject: s/drity/dirty/, s/separte/separate/
Separate can_merge, to reuse it for transaction support for merge
command.
Also, switch some asserts to errors.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
Reviewed-by: Eric
Separate can_merge, to reuse it for transaction support for merge
command.
Also, switch some asserts to errors.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
include/block/dirty-bitmap.h | 3 +++
include/qemu/hbitmap.h | 8
block/dirty-bitmap.c | 32 ++