[libvirt] [PATCH] qemu: Introduce shutdown reason for paused state
Jiri Denemark
jdenemar at redhat.com
Fri Sep 16 15:45:03 UTC 2011
On Thu, Sep 15, 2011 at 08:10:58 -0600, Eric Blake wrote:
> On 09/15/2011 07:29 AM, Jiri Denemark wrote:
> > Qemu sends STOP event as part of the shutdown process. Detect such STOP
> > event and consider shutdown to be reason of emitting such event. That's
> > the best we can do until qemu provides us the reason directly in STOP
> > event. This allows us to report shutdown reason for paused state so that
> > apps can detect domains that failed to finish the shutdown process
> > (e.g., because qemu is buggy and doesn't exit on SIGTERM or it is
> > blocked in flushing disk buffers).
> > ---
...
> > -#define VIR_DOMAIN_PAUSED_LAST (VIR_DOMAIN_PAUSED_FROM_SNAPSHOT + 1)
> > +#define VIR_DOMAIN_PAUSED_LAST (VIR_DOMAIN_PAUSED_SHUTTING_DOWN + 1)
>
> We have several other instances of *_LAST defined in libvirt.h.in as
> part of the enum, instead of a #define here; but this is a minimal
> change and doesn't make the situation any worse.
OK, I thought we were trying to avoid that... it's probably worth fixing in a
separate patch since this way it's too easy not to update the *_LAST macro.
>
> > +++ b/src/libvirt_private.syms
> > @@ -231,6 +231,8 @@ virDiskNameToBusDeviceIndex;
> > virDiskNameToIndex;
> > virDomainActualNetDefFree;
> > virDomainAssignDef;
> > +virDomainBlockedReasonTypeFromString;
> > +virDomainBlockedReasonTypeToString;
>
> Looks like we forgot to export these earlier; this could almost be a
> separate patch, but I'm okay keeping it in one.
> ACK.
Thanks, pushed.
Jirka
More information about the libvir-list
mailing list