Hi Kevin!
I'm confused with relations of permissions and invalidation, can you
please help?
Now dirty bitmaps are loaded in invalidate_cache. Here is a problem with
migration:
1. destination starts (inactive)
2. load bitmaps readonly
...
3. invalidate_cache: here we should make our loaded bitmaps RW, ie set
BdrvDirtyBitmap->readonly
to false and set IN_USE bit in the image. But the latter goes into
"bdrv_aligned_pwritev: Assertion `child->perm & BLK_PERM_WRITE' failed",
because in bdrv_invalidate_cache we call bdrv_set_perm after
drv->bdrv_invalidate_cache.
What is the true way of fixing this?
PS: actually current code calls qcow2_load_autoloading_dirty_bitmaps in
(3.) instead of qcow2_reopen_bitmaps_rw, which leads to
"Bitmap already exists" error - it's a bug which I am now fixing.
--
Best regards,
Vladimir