[PATCH 26/32] qemu: Rewrite bitmap handling for block commit

Peter Krempa pkrempa at redhat.com
Mon Jun 22 11:10:00 UTC 2020


On Thu, Jun 18, 2020 at 18:56:15 -0500, Eric Blake wrote:
> On 6/15/20 12:10 PM, Peter Krempa wrote:
> > Reuse qemuBlockGetBitmapMergeActions which allows to remove the ad-hoc
> 
> s/allows to remove/allows the removal of/
> 
> > implementatio of bitmap merging for block commit. The new approach is
> 
> implementation
> 
> > way simpler and more robust and also allows us to get rid of the
> > disabling of bitmaps done prior to the start as we actually do want to
> > update the bitmaps in the base.
> 
> What if the commit fails, but we have merged in portions of the bitmap? In
> practice, this merely means that a future attempt to use that bitmap in the
> backing file will now copy more data than previously necessary; what's more,
> if we try a commit again (if the failure was transient), we'll be setting
> those same bits again.  So yeah, I don't think it hurts to not disable the
> bitmaps in the backing files.

Well actually the bitmaps are merged only after the commit has finished
so we update them only once it's done. In the meanwhile all of them
which were present in the image before will get auto-updated with the
commited blocks which is IMO also a good thing.

Regardless, from the full chain point of view it will still look correct
and after a commit failure, the partial chain between the comitted
images is not valid anyways so we can't do much.




More information about the libvir-list mailing list