[libvirt] [PATCH 1/2] bhyve: fix domain management

Roman Bogorodskiy bogorodskiy at gmail.com
Wed Apr 9 07:05:41 UTC 2014


  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. 

Roman Bogorodskiy




More information about the libvir-list mailing list