[PATCH 04/32] qemu: backup: Move fetching of checkpoint list for incremental backup

Eric Blake eblake at redhat.com
Wed Jun 17 20:14:40 UTC 2020


On 6/15/20 12:09 PM, Peter Krempa wrote:
> Fetch the checkpoint list for every disk specifically based on the new
> per-disk 'incremental' field.
> 
> Signed-off-by: Peter Krempa <pkrempa at redhat.com>
> ---
>   src/qemu/qemu_backup.c | 108 ++++++++++++++++++++---------------------
>   1 file changed, 52 insertions(+), 56 deletions(-)
> 

> @@ -363,7 +407,7 @@ qemuBackupDiskPrepareDataOne(virDomainObjPtr vm,
>        * pull mode:
>        *   both: original disk
>        */
> -    if (pull || (incremental && dd->store->format >= VIR_STORAGE_FILE_BACKING)) {
> +    if (pull || (dd->backupdisk->incremental && dd->store->format >= VIR_STORAGE_FILE_BACKING)) {

Long line, if you want to break at the &&.

>           dd->backingStore = dd->domdisk->src;
>       } else {
>           dd->backingStore = dd->terminator = virStorageSourceNew();
> @@ -375,7 +419,10 @@ qemuBackupDiskPrepareDataOne(virDomainObjPtr vm,
>       if (qemuDomainPrepareStorageSourceBlockdev(NULL, dd->store, priv, cfg) < 0)
>           return -1;
> 
> -    if (incremental) {
> +    if (dd->backupdisk->incremental) {
> +        if (!(incremental = qemuBackupBeginCollectIncrementalCheckpoints(vm, dd->backupdisk->incremental)))

Another long line, but here it is harder to suggest a short alternative.

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

-- 
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