migration/block-dirty-bitmap: keep bitmap state for all bitmaps
commit0a47190a009614598dc5ae3d9d25138575184520
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Mon, 27 Jul 2020 19:42:29 +0000 (27 22:42 +0300)
committerEric Blake <eblake@redhat.com>
Mon, 27 Jul 2020 20:39:59 +0000 (27 15:39 -0500)
tree140594f0f81e2ec314258f27e63645db1e7a8246
parentf3045b9a828e99221083a4ad9905b9d7cdd4df2f
migration/block-dirty-bitmap: keep bitmap state for all bitmaps

Keep bitmap state for disabled bitmaps too. Keep the state until the
end of the process. It's needed for the following commit to implement
bitmap postcopy canceling.

To clean-up the new list the following logic is used:
We need two events to consider bitmap migration finished:
1. chunk with DIRTY_BITMAP_MIG_FLAG_COMPLETE flag should be received
2. dirty_bitmap_mig_before_vm_start should be called
These two events may come in any order, so we understand which one is
last, and on the last of them we remove bitmap migration state from the
list.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Message-Id: <20200727194236.19551-15-vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
migration/block-dirty-bitmap.c