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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
  src/qemu/qemu_block.c                         | 203 +-----------------
  src/qemu/qemu_block.h                         |  11 +-
  src/qemu/qemu_blockjob.c                      |  25 ++-
  src/qemu/qemu_driver.c                        |  56 +----
  tests/qemublocktest.c                         |  18 +-
  .../qemublocktestdata/bitmapblockcommit/empty |   1 -
  6 files changed, 42 insertions(+), 272 deletions(-)


@@ -3332,95 +3222,20 @@ qemuBlockBitmapsHandleCommitFinishIterate(void *payload,
  int
  qemuBlockBitmapsHandleCommitFinish(virStorageSourcePtr topsrc,
                                     virStorageSourcePtr basesrc,
+                                   bool active,
                                     virHashTablePtr blockNamedNodeData,
-                                   virJSONValuePtr *actions,
-                                   char **disabledBitmapsBase)
+                                   virJSONValuePtr *actions)
  {

Reviewed-by: Eric Blake <eblake@xxxxxxxxxx>

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux