[libvirt] [PATCH 4/4] Enable support for systemd-machined in cgroups creation

Eric Blake eblake at redhat.com
Tue Jul 30 19:22:12 UTC 2013


On 07/26/2013 09:48 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
> 
> Make the virCgroupNewMachine method try to use systemd-machined
> first. If that fails, then fallback to using the traditional
> cgroup setup code path.
> 
> Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> ---
>  src/lxc/lxc_process.c  |  10 +--
>  src/qemu/qemu_cgroup.c |   1 +
>  src/util/vircgroup.c   | 187 ++++++++++++++++++++++++++++++++++++++++++++-----
>  src/util/vircgroup.h   |   1 +
>  src/util/virsystemd.c  |   5 +-
>  5 files changed, 182 insertions(+), 22 deletions(-)
> 

> +/*
> + * Retujrns 0 on success, -1 on fatal error, -2 on systemd not available
> + */

s/Retujrns/Returns/

>  
> -    *group = NULL;
> +    path = (init)->controllers[VIR_CGROUP_CONTROLLER_SYSTEMD].placement;
> +    (init)->controllers[VIR_CGROUP_CONTROLLER_SYSTEMD].placement = NULL;

s/(init)/init/ (looks like you refactored, and had (*init) at one point)


> +++ b/src/util/virsystemd.c
> @@ -225,8 +225,9 @@ int virSystemdCreateMachine(const char *name,
>                            iscontainer ? "container" : "vm",
>                            (unsigned int)pidleader,
>                            rootdir ? rootdir : "",
> -                          1, "Slice", "s",
> -                          slicename) < 0) {
> +                          1,
> +                          "Slice", "s", slicename
> +                          ) < 0) {

Spurious reformatting?

ACK with nits fixed.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130730/11fe65b6/attachment-0001.sig>


More information about the libvir-list mailing list