On Mon, Sep 12, 2016 at 17:34:42 +0300, Nikolay Shirokovskiy wrote:

This is a pretty big change but you did not write anything to describe
or justify it.

> ---
>  src/logging/log_handler.c  | 38 ++++++++++++++++++++++++++++++++++++--
>  src/logging/log_protocol.x |  5 +++++
>  2 files changed, 41 insertions(+), 2 deletions(-)

[...]

> @@ -492,10 +517,19 @@ virLogHandlerDomainReadLogFile(virLogHandlerPtr handler,
>      char *data = NULL;
>      ssize_t got;
>  
> -    virCheckFlags(0, NULL);
> +    virCheckFlags(VIR_LOG_MANAGER_PROTOCOL_DOMAIN_READ_LOG_FILE_WAIT, NULL);
>  
>      virObjectLock(handler);
>  
> +    if (flags & VIR_LOG_MANAGER_PROTOCOL_DOMAIN_READ_LOG_FILE_WAIT) {
> +        while (virLogHandlerGetLogFileFromPath(handler, path)) {
> +            if (virCondWait(&handler->condition, &handler->parent.lock) < 0) 
> {
> +                virReportSystemError(errno, "%s", _("failed to wait for 
> EOF"));
> +                goto error;
> +            }
> +        }

E.g why do you need this? The qemu process is dead at the point when
libvirt attempts to read the log file so I don't see a reason to wait
here.

Peter

Attachment: signature.asc
Description: Digital signature

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

Reply via email to