Am 17.02.2017 um 13:24 hat Vladimir Sementsov-Ogievskiy geschrieben: > 16.02.2017 17:08, Kevin Wolf wrote: > >Am 15.02.2017 um 11:10 hat Vladimir Sementsov-Ogievskiy geschrieben: > >>Realize block bitmap storing interface, to allow qcow2 images store > >>persistent bitmaps. > >> > >>Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> > >>Reviewed-by: Max Reitz <mre...@redhat.com> > >>Reviewed-by: John Snow <js...@redhat.com> > >Similary to autoload, I think this must be called as part of > >qcow2_inactivate() rather than just in bdrv_close(). > > > >Kevin > > I prefer to store bitmaps once, on the final close of bds, and > remove corresponding BdrvDirtyBitmap in the same point. bdrv_close > is simpler point, I don't want to think about loading/saving bitmap > on each invalidate/inactivate. I don't want to make dependencies > between qcow2 bitmap loading/storing and migration, etc. > > So, my approach was just load bitmap on bdrv_open and store on > bdrv_close, and between these two calls BdrvDirtyBitmap lives its > normal life. For me it looks simpler. I'm not sure about what new > corner cases will come if we change this.
You make this sounds like invalidate/inactivate was a very frequent operation. It's not. Essentially it is what you probably consider open/close to be. The semantics is basically that after inactivate (or more precisely, as long as BDRV_O_INACTIVE is set), another process can access and potentially modify the image file. At invalidate, qemu takes ownership again and reloads everything from the image file. Kevin