Re: [libvirt] [PATCH 1/3] Avoid creating top level cgroups if just querying for existance

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

 



On Thu, Mar 04, 2010 at 11:27:17AM +0000, Daniel P. Berrange wrote:
> When getting the driver/domain cgroup it is possible to specify
> whether it should be auto created. If auto-creation was turned
> off, libvirt still mistakenly created its own top level cgroup
> 
> * src/util/cgroup.c: Honour autocreate flag for top level cgroup
> ---
>  src/util/cgroup.c |    7 ++++---
>  1 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/src/util/cgroup.c b/src/util/cgroup.c
> index ad0d595..b4c3353 100644
> --- a/src/util/cgroup.c
> +++ b/src/util/cgroup.c
> @@ -519,7 +519,8 @@ err:
>  }
>  
>  static int virCgroupAppRoot(int privileged,
> -                            virCgroupPtr *group)
> +                            virCgroupPtr *group,
> +                            int create)
>  {
>      virCgroupPtr rootgrp = NULL;
>      int rc;
> @@ -551,7 +552,7 @@ static int virCgroupAppRoot(int privileged,
>      if (rc != 0)
>          goto cleanup;
>  
> -    rc = virCgroupMakeGroup(rootgrp, *group, 1);
> +    rc = virCgroupMakeGroup(rootgrp, *group, create);
>  
>  cleanup:
>      virCgroupFree(&rootgrp);
> @@ -638,7 +639,7 @@ int virCgroupForDriver(const char *name,
>      char *path = NULL;
>      virCgroupPtr rootgrp = NULL;
>  
> -    rc = virCgroupAppRoot(privileged, &rootgrp);
> +    rc = virCgroupAppRoot(privileged, &rootgrp, create);
>      if (rc != 0)
>          goto out;
>  

  ACK,

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
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]