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

Re: [libvirt] [PATCH] Add support for SUSPEND_DISK event

On Fri, Oct 12, 2012 at 09:28:04PM +0200, Martin Kletzander wrote:
> This patch adds support for SUSPEND_DISK event; both lifecycle and
> separated.  The support is added for QEMU, machines are changed to
> PMSUSPENDED, but as QEMU sends SHUTDOWN afterwards, the state changes
> to shut-off.  This and much more needs to be done in order for libvirt
> to work with transient devices, wake-ups etc.  This patch is not
> aiming for that functionality.

I'm not convinced that we actually need a new PMSUSPEND_DISK event
callback. The existing callback:

 * virConnectDomainEventPMSuspendCallback:
 * @conn: connection object
 * @dom: domain on which the event occurred
 * @reason: reason why the callback was called, unused currently,
 *          always passes 0
 * @opaque: application specified data
 * This callback occurs when the guest is waken up.
 * The callback signature to use when registering for an event of type
 * VIR_DOMAIN_EVENT_ID_PMSuspend with virConnectDomainEventRegisterAny()
typedef void (*virConnectDomainEventPMSuspendCallback)(virConnectPtr conn,
                                                       virDomainPtr dom,
                                                       int reason,
                                                       void *opaque);

already has a 'reason' argumnent that is unused, and could be used
to distinguish between S3 and S4 (memory vs disk).

|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

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