mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-18 00:58:31 +00:00
On restore find out in which sets tasks live in and move them there. Optimization note -- move tasks into cgroups _before_ fork kids to make them inherit cgroups if required. This saves a lot of time. Accessibility note -- when moving tasks into cgroups don't search for existing host mounts (they may be not available) and don't mount temporary ones (may be impossible due to user namespaces). Instead introduce service fd with a yard of mounts. Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
33 lines
842 B
C
33 lines
842 B
C
#ifndef __CR_SERVICE_FD_H__
|
|
#define __CR_SERVICE_FD_H__
|
|
|
|
#include <stdbool.h>
|
|
|
|
enum sfd_type {
|
|
SERVICE_FD_MIN,
|
|
|
|
LOG_FD_OFF,
|
|
IMG_FD_OFF,
|
|
PROC_FD_OFF, /* fd with /proc for all proc_ calls */
|
|
CTL_TTY_OFF,
|
|
SELF_STDIN_OFF,
|
|
CR_PROC_FD_OFF, /* some other's proc fd.
|
|
* For dump -- target ns' proc
|
|
* For restore -- CRIU ns' proc
|
|
*/
|
|
ROOT_FD_OFF, /* Root of the namespace we dump/restore */
|
|
CGROUP_YARD,
|
|
|
|
SERVICE_FD_MAX
|
|
};
|
|
|
|
extern int clone_service_fd(int id);
|
|
extern int init_service_fd(void);
|
|
extern int get_service_fd(enum sfd_type type);
|
|
extern int reserve_service_fd(enum sfd_type type);
|
|
extern int install_service_fd(enum sfd_type type, int fd);
|
|
extern int close_service_fd(enum sfd_type type);
|
|
extern bool is_service_fd(int fd, enum sfd_type type);
|
|
extern bool is_any_service_fd(int fd);
|
|
|
|
#endif /* __CR_SERVICE_FD_H__ */
|