Re: [PATCH 06/24] qemu: Always set async job when starting a domain

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 12, 2015 at 19:37:08 +0100, Jiri Denemark wrote:
> We only started an async job for incoming migration from another host.
> When we were starting a domain from scratch or restoring from a saved
> state (migration from file) we didn't set any async job. Let's introduce
> a new QEMU_ASYNC_JOB_START for these cases.
> 
> Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
> ---
>  src/qemu/qemu_domain.c  |  3 +++
>  src/qemu/qemu_domain.h  |  1 +
>  src/qemu/qemu_driver.c  | 72 +++++++++++++++++++++++++++----------------------
>  src/qemu/qemu_process.c | 30 ++++++++++++++++++++-
>  src/qemu/qemu_process.h |  7 ++++-
>  5 files changed, 79 insertions(+), 34 deletions(-)
> 

[...]

> diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
> index 638ad02..f85e876 100644
> --- a/src/qemu/qemu_process.c
> +++ b/src/qemu/qemu_process.c
> @@ -3412,6 +3412,10 @@ qemuProcessRecoverJob(virQEMUDriverPtr driver,
>          }
>          break;
>  
> +    case QEMU_ASYNC_JOB_START:
> +        /* Already handled in VIR_DOMAIN_PAUSED_STARTING_UP check. */
> +        break;
> +
>      case QEMU_ASYNC_JOB_NONE:
>      case QEMU_ASYNC_JOB_LAST:
>          break;
> @@ -4197,10 +4201,34 @@ qemuProcessIncomingDefNew(virQEMUCapsPtr qemuCaps,
>  }
>  
>  
> +int
> +qemuProcessBeginJob(virQEMUDriverPtr driver,
> +                    virDomainObjPtr vm)

At least this one deserves a comment. You should state the fact that
users shall use QEMU_ASYNC_JOB_START for the corresponding functions
later on.

> +{
> +    qemuDomainObjPrivatePtr priv = vm->privateData;
> +
> +    if (qemuDomainObjBeginAsyncJob(driver, vm, QEMU_ASYNC_JOB_START) < 0)
> +        return -1;
> +
> +    qemuDomainObjSetAsyncJobMask(vm, QEMU_JOB_NONE);
> +    priv->job.current->type = VIR_DOMAIN_JOB_UNBOUNDED;
> +
> +    return 0;
> +}

ACK

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]