forked from checkpoint-restore/criu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cr_options.h
128 lines (114 loc) · 2.88 KB
/
cr_options.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
#ifndef __CR_OPTIONS_H__
#define __CR_OPTIONS_H__
#include <stdbool.h>
#include "config.h"
#include "common/list.h"
/*
* CPU capability options.
*/
#define CPU_CAP_NONE (0u)
#define CPU_CAP_ALL (-1u)
#define CPU_CAP_FPU (1u) /* Only FPU capability required */
#define CPU_CAP_CPU (2u) /* Strict CPU capability required */
#define CPU_CAP_INS (4u) /* Instructions CPU capatibility */
#define CPU_CAP_DEFAULT (CPU_CAP_FPU)
struct cg_root_opt {
struct list_head node;
char *controller;
char *newroot;
};
/*
* Cgroup management options.
*/
#define CG_MODE_IGNORE (0u << 0) /* Zero is important here */
#define CG_MODE_NONE (1u << 0)
#define CG_MODE_PROPS (1u << 1)
#define CG_MODE_SOFT (1u << 2)
#define CG_MODE_FULL (1u << 3)
#define CG_MODE_STRICT (1u << 4)
#define CG_MODE_DEFAULT (CG_MODE_SOFT)
/*
* Ghost file size we allow to carry by default.
*/
#define DEFAULT_GHOST_LIMIT (1 << 20)
#define DEFAULT_TIMEOUT 10
struct irmap;
struct irmap_path_opt {
struct list_head node;
struct irmap *ir;
};
struct cr_options {
int final_state;
char *show_dump_file;
char *show_fmt;
bool check_extra_features;
bool check_experimental_features;
bool show_pages_content;
union {
bool restore_detach;
bool daemon_mode;
};
bool restore_sibling;
bool ext_unix_sk;
bool shell_job;
bool handle_file_locks;
bool tcp_established_ok;
bool evasive_devices;
bool link_remap_ok;
bool log_file_per_pid;
bool swrk_restore;
char *output;
char *root;
char *pidfile;
char *freeze_cgroup;
struct list_head ext_mounts;
struct list_head inherit_fds;
struct list_head external;
struct list_head join_ns;
char *libdir;
bool use_page_server;
unsigned short port;
char *addr;
int ps_socket;
bool track_mem;
char *img_parent;
bool auto_dedup;
unsigned int cpu_cap;
bool force_irmap;
char **exec_cmd;
unsigned int manage_cgroups;
char *new_global_cg_root;
char *cgroup_props;
char *cgroup_props_file;
struct list_head new_cgroup_roots;
bool autodetect_ext_mounts;
bool enable_external_sharing;
bool enable_external_masters;
bool aufs; /* auto-deteced, not via cli */
bool overlayfs;
#ifdef CONFIG_BINFMT_MISC_VIRTUALIZED
bool has_binfmt_misc; /* auto-detected */
#endif
size_t ghost_limit;
struct list_head irmap_scan_paths;
bool lsm_supplied;
char *lsm_profile;
unsigned int timeout;
unsigned int empty_ns;
bool tcp_skip_in_flight;
char *work_dir;
/*
* When we scheduler for removal some functionality we first
* deprecate it and it sits in criu for some time. By default
* the deprecated stuff is not working, but it's still possible
* to turn one ON while the code is in.
*/
bool deprecated_ok;
bool display_stats;
bool weak_sysctls;
int status_fd;
bool orphan_pts_master;
};
extern struct cr_options opts;
extern void init_opts(void);
#endif /* __CR_OPTIONS_H__ */