]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Refactor cgroups internal data structures
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 22 Mar 2013 11:11:34 +0000 (11:11 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 15 Apr 2013 16:35:31 +0000 (17:35 +0100)
commit8d1c141a8d828e6afa7fd6b3e2f6e7c3b7351eec
tree6f7190aae5c2cf63098ee5dd3d8ac5af0a6e324a
parentd14524701ac0d3cf3108595b52f7f41292a22333
Refactor cgroups internal data structures

Currently the virCgroupPtr struct contains 3 pieces of
information

 - path - path of the cgroup, relative to current process'
   cgroup placement
 - placement - current process' placement in each controller
 - mounts - mount point of each controller

When reading/writing cgroup settings, the path & placement
strings are combined to form the file path. This approach
only works if we assume all cgroups will be relative to
the current process' cgroup placement.

To allow support for managing cgroups at any place in the
heirarchy a change is needed. The 'placement' data should
reflect the absolute path to the cgroup, and the 'path'
value should no longer be used to form the paths to the
cgroup attribute files.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/util/vircgroup.c
tests/vircgrouptest.c