]> git.proxmox.com Git - mirror_lxc.git/commit - src/lxc/cgroups/cgfs.c
split cgroup handling into discrete backends
authorDwight Engen <dwight.engen@oracle.com>
Wed, 5 Feb 2014 21:59:26 +0000 (16:59 -0500)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Thu, 6 Feb 2014 16:46:19 +0000 (10:46 -0600)
commit4fb3cba5bc6b256b774e780f2bbf47b1dbcc0ce9
tree71e391274d79ae3c40cf2cb0239aa7f465d2c065
parent20e2ae994feb1bc82cfcf3e5ed82431324bcb401
split cgroup handling into discrete backends

- refactor cgroup into two backends, the classic cgfs driver and the new
  cgmanager. Instead of lxc_handler knowing about the internals of each,
  have it just store an opaque pointer to a struct that is private to
  each backend.

- rename a couple of cgroup functions for consistency: those that are
  considered an API (ie. exported by lxc.h) begin with lxc_ and those that
  are not are just cgroup_*

- made as many backend routines static as possible, only cg*_ops_init is
  exported

- made a nrtasks op which is needed by the utmp code for monitoring
  container shutdown, currently only implemented for the cgfs backend

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
14 files changed:
src/lxc/Makefile.am
src/lxc/attach.c
src/lxc/cgfs.c
src/lxc/cgmanager.c
src/lxc/cgroup.c [new file with mode: 0644]
src/lxc/cgroup.h
src/lxc/commands.c
src/lxc/conf.c
src/lxc/freezer.c
src/lxc/lxc.h
src/lxc/lxcutmp.c
src/lxc/start.h
src/lxc/state.c
src/tests/cgpath.c