]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
api: add function for creating template control groups
authorIvana Hutarova Varekova <varekova@redhat.com>
Mon, 28 Jan 2013 13:42:25 +0000 (14:42 +0100)
committerIvana Hutarova Varekova <varekova@redhat.com>
Mon, 28 Jan 2013 13:42:25 +0000 (14:42 +0100)
commit0d1dcdeba06dbaa003d39f93dbdd7b5a6e07204c
treebba5fa1a3eba4269fa96db07adfad513732b8186
parent361be8239c5beb0b5a45f18e39c8a317eac7a1d4
api: add function for creating template control groups

    add a function: int cgroup_config_create_template_group(const char *pathname,
                struct cgroup *cgroup, char *template_name,
                int ignore_ownership);

     Physically create a new control group in kernel, based on given control
     group template and configuration file. If given template is not set in
     configuration file, then the procedure works create the control group
     using  cgroup_create_cgroup function

    input parameters are:
    pathname .. name of template configuration file (/etc/cgconfig.conf by default)
    cgroup   .. control group name and subsystems to which it should belong to
    template_name .. name of the template we want to use
    flags .. Bit flags to change the behavior

    return 0 on success

    CHANGELOG:
        reload template rules if it is necessary, don't init them
        create a control group in all controllers which have no relevant template
        return the template name when it is changed - Jan's feedback

Signed-off-by: Ivana Hutarova Varekova <varekova@redhat.com>
Acked-by: Jan Safranek<jsafrane@redhat.com>
include/libcgroup/config.h
include/libcgroup/tasks.h
src/config.c
src/libcgroup.map