mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-05 00:35:23 +00:00
Attempt to restore cgroups
During the dump phase, /proc/cgroups is parsed to find co-mounted cgroups. Then, for each task /proc/self/cgroup is parsed for the cgroups that it is a member of, and that cgroup is traversed to find any child cgroups which may also need restoring. Any cgroups not currently mounted will be temporarily mounted and traversed. All of this information is persisted along with the original cg_sets, which indicate which cgroups a task is a member of. On restore, an initial phase creates all the cgroups which were saved. Tasks are then restored into these cgroups via cg_sets as usual. Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
e1b56c8fac
commit
51876eea5d
@@ -5,6 +5,7 @@
|
||||
#include "asm/types.h"
|
||||
#include "image.h"
|
||||
#include "list.h"
|
||||
#include "cgroup.h"
|
||||
|
||||
#include "protobuf/eventfd.pb-c.h"
|
||||
#include "protobuf/eventpoll.pb-c.h"
|
||||
@@ -203,4 +204,6 @@ struct cg_ctl {
|
||||
extern int parse_task_cgroup(int pid, struct list_head *l, unsigned int *n);
|
||||
extern void put_ctls(struct list_head *);
|
||||
|
||||
int parse_cgroups(struct list_head *cgroups, unsigned int *n_cgroups);
|
||||
|
||||
#endif /* __CR_PROC_PARSE_H__ */
|
||||
|
Reference in New Issue
Block a user