Re: [PATCH v2 2/3] libxl: implement virDomainPM* functions

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

 



On Fri, Sep 07, 2018 at 11:10:14AM -0600, Jim Fehlig wrote:
> On 09/06/2018 03:06 PM, Marek Marczykowski-Górecki wrote:
> 
> A few additional comments came to mind while looking at this patch again...

Perfect timing, I was just going to hit "send" on v3...

> > > > +    /* Unlock virDomainObjPtr to not deadlock with even handler, which will try
> > > > +     * to send lifecycle event
> > > > +     */
> > > > +    virObjectUnlock(vm);
> > > > +    ret = libxl_domain_suspend_only(cfg->ctx, vm->def->id, NULL);
> > > > +    virObjectLock(vm);
> > > > +
> > > > +    if (ret < 0) {
> > > > +        virReportError(VIR_ERR_INTERNAL_ERROR,
> > > > +                       _("Failed to suspend domain '%d'"), vm->def->id);
> > > > +        goto endjob;
> > > > +    }
> > > > +
> 
> Should we create a lifecycle event and/or call virDomainObjSetState on
> successful suspend? Seems neither are done in the qemu driver, but might be
> an oversight there too.

Not sure about qemu, but here it is done by libxl domain death
event handler (libxlDomainShutdownThread in libxl_domain.c). See patch
1/3.

-- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

Attachment: signature.asc
Description: PGP 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]

  Powered by Linux