Re: [PATCH] qemu: Fix job entry debug message

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

 



On Wed, Nov 11, 2015 at 15:15:56 +0100, Jiri Denemark wrote:
> Logging current async job while in BeginJob is useful, but the async job
> we want to start is even more interesting.

A little confusing on the first read.

> 
> Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
> ---
>  src/qemu/qemu_domain.c | 16 +++++++++++-----
>  1 file changed, 11 insertions(+), 5 deletions(-)
> 
> diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
> index 416ab5b..0a7437a 100644
> --- a/src/qemu/qemu_domain.c
> +++ b/src/qemu/qemu_domain.c
> @@ -1476,17 +1476,23 @@ qemuDomainObjBeginJobInternal(virQEMUDriverPtr driver,
>      unsigned long long now;
>      unsigned long long then;
>      bool nested = job == QEMU_JOB_ASYNC_NESTED;
> +    bool async = job == QEMU_JOB_ASYNC;
>      virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
>      const char *blocker = NULL;
>      int ret = -1;
>      unsigned long long duration = 0;
>      unsigned long long asyncDuration = 0;
> +    const char *jobStr;
>  
> -    VIR_DEBUG("Starting %s: %s (async=%s vm=%p name=%s)",
> -              job == QEMU_JOB_ASYNC ? "async job" : "job",
> -              qemuDomainJobTypeToString(job),
> -              qemuDomainAsyncJobTypeToString(priv->job.asyncJob),
> -              obj, obj->def->name);
> +    if (async)
> +        jobStr = qemuDomainAsyncJobTypeToString(asyncJob);
> +    else
> +        jobStr = qemuDomainJobTypeToString(job);
> +
> +    VIR_DEBUG("Starting %s: %s (vm=%p name=%s, current job=%s async=%s)",
> +              async ? "async job" : "job", jobStr, obj, obj->def->name,
> +              qemuDomainJobTypeToString(priv->job.active),
> +              qemuDomainAsyncJobTypeToString(priv->job.asyncJob));

ACK,

Peter

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]