qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] loading bitmaps in invalidate_cache fails
@ 2017-09-11 16:51 Vladimir Sementsov-Ogievskiy
  2017-09-12  9:46 ` Kevin Wolf
  0 siblings, 1 reply; 6+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2017-09-11 16:51 UTC (permalink / raw)
  To: Kevin Wolf, qemu-devel, qemu block; +Cc: Max Reitz

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-10-30 14:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-11 16:51 [Qemu-devel] loading bitmaps in invalidate_cache fails Vladimir Sementsov-Ogievskiy
2017-09-12  9:46 ` Kevin Wolf
2017-09-28 13:06   ` [Qemu-devel] [PATCH] iotests: test clearing unknown autoclear_features by qcow2 Vladimir Sementsov-Ogievskiy
2017-09-28 13:26     ` no-reply
2017-10-05  9:41   ` [Qemu-devel] loading bitmaps in invalidate_cache fails Vladimir Sementsov-Ogievskiy
2017-10-30 14:55     ` [Qemu-devel] ping " Vladimir Sementsov-Ogievskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).