[libvirt] [PATCH 2/3] qemu: backup: Implement support for backup disk export name configuration

Eric Blake eblake at redhat.com
Tue Jan 14 14:48:46 UTC 2020


On 1/9/20 12:31 PM, Peter Krempa wrote:
> Pass the exportname as configured when exporting the image via NBD and
> fill it with the default if it's not configured.
> 
> Signed-off-by: Peter Krempa <pkrempa at redhat.com>
> ---
>   src/qemu/qemu_backup.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)

Reviewed-by: Eric Blake <eblake at redhat.com>

> 
> diff --git a/src/qemu/qemu_backup.c b/src/qemu/qemu_backup.c
> index c47de2f4a8..2cc0e6ab07 100644
> --- a/src/qemu/qemu_backup.c
> +++ b/src/qemu/qemu_backup.c
> @@ -548,9 +548,12 @@ qemuBackupBeginPullExportDisks(virDomainObjPtr vm,
>       for (i = 0; i < ndisks; i++) {
>           struct qemuBackupDiskData *dd = disks + i;
> 
> +        if (!dd->backupdisk->exportname)
> +            dd->backupdisk->exportname = g_strdup(dd->domdisk->dst);
> +
>           if (qemuMonitorNBDServerAdd(priv->mon,
>                                       dd->store->nodeformat,
> -                                    dd->domdisk->dst,
> +                                    dd->backupdisk->exportname,
>                                       false,
>                                       dd->incrementalBitmap) < 0)
>               return -1;
> 

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




More information about the libvir-list mailing list