Store a virCgroupPtr instance in virLXCDomainObjPrivatePtr
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 21 Mar 2013 14:40:29 +0000 (14:40 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 15 Apr 2013 16:35:31 +0000 (17:35 +0100)
commitcfed9ad4fb28e268e1467a0071c2fbc0c0873969
tree9c5009bb55f748587d88a7d38d40ae60b6691fb6
parent632f78caaf7cbc0d120c0d6fc123da89fc7da516
Store a virCgroupPtr instance in virLXCDomainObjPrivatePtr

Instead of calling virCgroupForDomain every time we need
the virCgrouPtr instance, just do it once at Vm startup
and cache a reference to the object in virLXCDomainObjPrivatePtr
until shutdown of the VM. Removing the virCgroupPtr from
the LXC driver state also means we don't have stale mount
info, if someone mounts the cgroups filesystem after libvirtd
has been started

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/lxc/lxc_cgroup.c
src/lxc/lxc_cgroup.h
src/lxc/lxc_conf.h
src/lxc/lxc_controller.c
src/lxc/lxc_domain.c
src/lxc/lxc_domain.h
src/lxc/lxc_driver.c
src/lxc/lxc_process.c