[PATCH] qemu: backup: Properly delete temporary bitmap after push-mode incremental backup

Peter Krempa posted 1 patch 3 years, 3 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/75a0aea11b7d9c40cd4079c36c5aade4e47345e6.1609858140.git.pkrempa@redhat.com
src/qemu/qemu_backup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] qemu: backup: Properly delete temporary bitmap after push-mode incremental backup
Posted by Peter Krempa 3 years, 3 months ago
Refactor in 0316c28a453ac used incorrect source variable to initialize
the variable which holds the name of the bitmap which needs to be
deleted after the backup job finishes. This resulted into deleting the
source bitmap of the backup rather than the temporary one.

Use 'dd->incrementalBitmap' which holds the temporary bitmap name
instead of 'dd->backupdisk->incremental' which holds the name of the
source bitmap which is used by the backup.

Fixes: 0316c28a453ac15f58c61f30359f66ab9a649884
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1908647
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
 src/qemu/qemu_backup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_backup.c b/src/qemu/qemu_backup.c
index b2340eb1cf..c444f8aaba 100644
--- a/src/qemu/qemu_backup.c
+++ b/src/qemu/qemu_backup.c
@@ -235,7 +235,7 @@ qemuBackupDiskPrepareOneBitmaps(struct qemuBackupDiskData *dd,
                                                  blockNamedNodeData) < 0)
             return -1;

-        dd->domdiskIncrementalBitmap = dd->backupdisk->incremental;
+        dd->domdiskIncrementalBitmap = dd->incrementalBitmap;
     }

     return 0;
-- 
2.29.2

Re: [PATCH] qemu: backup: Properly delete temporary bitmap after push-mode incremental backup
Posted by Ján Tomko 3 years, 3 months ago
On a Tuesday in 2021, Peter Krempa wrote:
>Refactor in 0316c28a453ac used incorrect source variable to initialize
>the variable which holds the name of the bitmap which needs to be
>deleted after the backup job finishes. This resulted into deleting the
>source bitmap of the backup rather than the temporary one.
>
>Use 'dd->incrementalBitmap' which holds the temporary bitmap name
>instead of 'dd->backupdisk->incremental' which holds the name of the
>source bitmap which is used by the backup.
>
>Fixes: 0316c28a453ac15f58c61f30359f66ab9a649884
>Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1908647
>Signed-off-by: Peter Krempa <pkrempa@redhat.com>
>---
> src/qemu/qemu_backup.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano