qemu: backup: Implement support for backup disk bitmap name configuration

Use the user-configured name of the bitmap when merging the appropriate
bitmaps for an incremental backup so that the user can see it as
configured. Additionally expose the default bitmap name if nothing is
configured.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
Peter Krempa 2019-12-20 12:38:16 +01:00
parent bce4ac55f8
commit 0c3792a155

View File

@ -322,7 +322,10 @@ qemuBackupDiskPrepareDataOne(virDomainObjPtr vm,
return -1;
if (incremental) {
dd->incrementalBitmap = g_strdup_printf("backup-%s", dd->domdisk->dst);
if (dd->backupdisk->exportbitmap)
dd->incrementalBitmap = g_strdup(dd->backupdisk->exportbitmap);
else
dd->incrementalBitmap = g_strdup_printf("backup-%s", dd->domdisk->dst);
if (qemuBackupDiskPrepareOneBitmaps(dd, actions, incremental,
blockNamedNodeData) < 0)
@ -368,6 +371,10 @@ static int
qemuBackupDiskPrepareDataOnePull(virJSONValuePtr actions,
struct qemuBackupDiskData *dd)
{
if (!dd->backupdisk->exportbitmap &&
dd->incrementalBitmap)
dd->backupdisk->exportbitmap = g_strdup(dd->incrementalBitmap);
if (qemuMonitorTransactionBackup(actions,
dd->domdisk->src->nodeformat,
dd->blockjob->name,