qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 35/40] job: Add JOB_STATUS_CHANGE QMP event


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v2 35/40] job: Add JOB_STATUS_CHANGE QMP event
Date: Thu, 24 May 2018 13:22:59 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

On 05/24/2018 12:36 PM, John Snow wrote:

On 05/18/2018 09:21 AM, Kevin Wolf wrote:
This adds a QMP event that is emitted whenever a job transitions from
one status to another.

Signed-off-by: Kevin Wolf <address@hidden>


The question that I was asking myself was just whether I'd literally
duplicate the existing events, just with s/BLOCK_JOB_/JOB_/, or whether
a single event with a status field can do. I think the latter is more
elegant (also because it can be implemented in a single place), even if
it is emitted a bit more often than strictly necessary.


Code-wise I agree that this is more elegant; just wondering if the
implications of the additional API guarantees were considered. This
means we have to be a bit more careful about how we restructure the
state machine in the future, I think.

It also makes the "NULL" state visible, which I didn't really intend...
It's probably fine, just a little quirky.

Is it worth a special case to avoid emitting the event on transition to the NULL state?

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]