[libvirt] [PATCH 1/2] bhyve: fix domain management
Roman Bogorodskiy
bogorodskiy at gmail.com
Fri Apr 11 16:23:10 UTC 2014
Roman Bogorodskiy wrote:
> Wojciech Macek wrote:
>
> > When domain is not persistent, it should be forgotten upon destroying.
> > ---
> > src/bhyve/bhyve_driver.c | 10 ++++++++--
> > 1 file changed, 8 insertions(+), 2 deletions(-)
> >
> > diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c
> > index 7187202..23e7112 100644
> > --- a/src/bhyve/bhyve_driver.c
> > +++ b/src/bhyve/bhyve_driver.c
> > @@ -753,8 +753,14 @@ bhyveDomainDestroy(virDomainPtr dom)
> >
> > ret = virBhyveProcessStop(privconn, vm, VIR_DOMAIN_SHUTOFF_DESTROYED);
> >
> > - cleanup:
> > - virObjectUnlock(vm);
> > + if (!vm->persistent) {
> > + virDomainObjListRemove(privconn->domains, vm);
> > + vm = NULL;
> > + }
> > +
> > +cleanup:
> > + if (vm)
> > + virObjectUnlock(vm);
> > return ret;
> > }
>
> ACK, I'm going to push that tomorrow if there'll be no other notes.
Squashed in a label formatting style fix (now labels should have one space
offset) and pushed, thanks!
Roman Bogorodskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140411/ca7d8ce3/attachment-0001.sig>
More information about the libvir-list
mailing list