|
|
d76c62 |
From fc87d33beca46597b7d413752a07f50af8579a6a Mon Sep 17 00:00:00 2001
|
|
|
d76c62 |
Message-Id: <fc87d33beca46597b7d413752a07f50af8579a6a@dist-git>
|
|
|
d76c62 |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
d76c62 |
Date: Tue, 4 Feb 2020 15:07:42 +0100
|
|
|
d76c62 |
Subject: [PATCH] qemu: backup: Implement support for backup disk bitmap name
|
|
|
d76c62 |
configuration
|
|
|
d76c62 |
MIME-Version: 1.0
|
|
|
d76c62 |
Content-Type: text/plain; charset=UTF-8
|
|
|
d76c62 |
Content-Transfer-Encoding: 8bit
|
|
|
d76c62 |
|
|
|
d76c62 |
Use the user-configured name of the bitmap when merging the appropriate
|
|
|
d76c62 |
bitmaps for an incremental backup so that the user can see it as
|
|
|
d76c62 |
configured. Additionally expose the default bitmap name if nothing is
|
|
|
d76c62 |
configured.
|
|
|
d76c62 |
|
|
|
d76c62 |
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
|
|
d76c62 |
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
|
|
|
d76c62 |
(cherry picked from commit 0c3792a155d79ecf39221b9856fa14fde183af91)
|
|
|
d76c62 |
|
|
|
d76c62 |
https://bugzilla.redhat.com/show_bug.cgi?id=1207659
|
|
|
d76c62 |
Message-Id: <0071b6d1293859c700344434e71e3b2f75ce6ffd.1580824112.git.pkrempa@redhat.com>
|
|
|
d76c62 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
d76c62 |
---
|
|
|
d76c62 |
src/qemu/qemu_backup.c | 9 ++++++++-
|
|
|
d76c62 |
1 file changed, 8 insertions(+), 1 deletion(-)
|
|
|
d76c62 |
|
|
|
d76c62 |
diff --git a/src/qemu/qemu_backup.c b/src/qemu/qemu_backup.c
|
|
|
d76c62 |
index 2cc0e6ab07..23518a5d40 100644
|
|
|
d76c62 |
--- a/src/qemu/qemu_backup.c
|
|
|
d76c62 |
+++ b/src/qemu/qemu_backup.c
|
|
|
d76c62 |
@@ -322,7 +322,10 @@ qemuBackupDiskPrepareDataOne(virDomainObjPtr vm,
|
|
|
d76c62 |
return -1;
|
|
|
d76c62 |
|
|
|
d76c62 |
if (incremental) {
|
|
|
d76c62 |
- dd->incrementalBitmap = g_strdup_printf("backup-%s", dd->domdisk->dst);
|
|
|
d76c62 |
+ if (dd->backupdisk->exportbitmap)
|
|
|
d76c62 |
+ dd->incrementalBitmap = g_strdup(dd->backupdisk->exportbitmap);
|
|
|
d76c62 |
+ else
|
|
|
d76c62 |
+ dd->incrementalBitmap = g_strdup_printf("backup-%s", dd->domdisk->dst);
|
|
|
d76c62 |
|
|
|
d76c62 |
if (qemuBackupDiskPrepareOneBitmaps(dd, actions, incremental,
|
|
|
d76c62 |
blockNamedNodeData) < 0)
|
|
|
d76c62 |
@@ -368,6 +371,10 @@ static int
|
|
|
d76c62 |
qemuBackupDiskPrepareDataOnePull(virJSONValuePtr actions,
|
|
|
d76c62 |
struct qemuBackupDiskData *dd)
|
|
|
d76c62 |
{
|
|
|
d76c62 |
+ if (!dd->backupdisk->exportbitmap &&
|
|
|
d76c62 |
+ dd->incrementalBitmap)
|
|
|
d76c62 |
+ dd->backupdisk->exportbitmap = g_strdup(dd->incrementalBitmap);
|
|
|
d76c62 |
+
|
|
|
d76c62 |
if (qemuMonitorTransactionBackup(actions,
|
|
|
d76c62 |
dd->domdisk->src->nodeformat,
|
|
|
d76c62 |
dd->blockjob->name,
|
|
|
d76c62 |
--
|
|
|
d76c62 |
2.25.0
|
|
|
d76c62 |
|