Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
criu
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhul
criu
Commits
26529414
Commit
26529414
authored
Sep 20, 2016
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unux: Make --external support --ext-unix-sk
Signed-off-by:
Pavel Emelyanov
<
xemul@virtuozzo.com
>
parent
f2037e6d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
30 deletions
+15
-30
crtools.c
criu/crtools.c
+1
-4
cr_options.h
criu/include/cr_options.h
+0
-1
sk-unix.c
criu/sk-unix.c
+13
-24
rpc.proto
images/rpc.proto
+1
-1
No files found.
criu/crtools.c
View file @
26529414
...
...
@@ -61,7 +61,6 @@ void init_opts(void)
/* Default options */
opts
.
final_state
=
TASK_DEAD
;
INIT_LIST_HEAD
(
&
opts
.
ext_unixsk_ids
);
INIT_LIST_HEAD
(
&
opts
.
ext_mounts
);
INIT_LIST_HEAD
(
&
opts
.
inherit_fds
);
INIT_LIST_HEAD
(
&
opts
.
external
);
...
...
@@ -827,14 +826,12 @@ usage:
" tty[rdev:dev]
\n
"
" file[mnt_id:inode]
\n
"
" dev[maj:min]:VAL
\n
"
" unix[ino]
\n
"
" Formats of RES on restore:
\n
"
" dev[VAL]:DEVPATH
\n
"
" veth[IFNAME]:OUTNAME{@BRIDGE}
\n
"
"
\n
"
"* Special resources support:
\n
"
" -x|--"
USK_EXT_PARAM
" [inode,...]
\n
"
" allow external unix connections (optional arguments
\n
"
" are socketpair inode(s) that allow one-sided dump)
\n
"
" --"
SK_EST_PARAM
" checkpoint/restore established TCP connections
\n
"
" --"
SK_INFLIGHT_PARAM
" skip (ignore) in-flight TCP connections
\n
"
" -r|--root PATH change the root filesystem (when run in mount namespace)
\n
"
...
...
criu/include/cr_options.h
View file @
26529414
...
...
@@ -60,7 +60,6 @@ struct cr_options {
};
bool
restore_sibling
;
bool
ext_unix_sk
;
struct
list_head
ext_unixsk_ids
;
bool
shell_job
;
bool
handle_file_locks
;
bool
tcp_established_ok
;
...
...
criu/sk-unix.c
View file @
26529414
...
...
@@ -26,6 +26,7 @@
#include "plugin.h"
#include "namespaces.h"
#include "pstree.h"
#include "external.h"
#include "crtools.h"
#include "protobuf.h"
...
...
@@ -94,11 +95,6 @@ struct unix_sk_listen_icon {
struct
unix_sk_listen_icon
*
next
;
};
struct
unix_sk_exception
{
struct
list_head
unix_sk_list
;
ino_t
unix_sk_ino
;
};
#define SK_HASH_SIZE 32
static
struct
unix_sk_listen_icon
*
unix_listen_icons
[
SK_HASH_SIZE
];
...
...
@@ -165,18 +161,15 @@ static int can_dump_unix_sk(const struct unix_sk_desc *sk)
static
bool
unix_sk_exception_lookup_id
(
ino_t
ino
)
{
bool
ret
=
false
;
struct
unix_sk_exception
*
sk
;
list_for_each_entry
(
sk
,
&
opts
.
ext_unixsk_ids
,
unix_sk_list
)
{
if
(
sk
->
unix_sk_ino
==
ino
)
{
pr_debug
(
"Found ino %u in exception unix sk list
\n
"
,
(
unsigned
int
)
ino
);
ret
=
true
;
break
;
}
char
id
[
20
];
snprintf
(
id
,
sizeof
(
id
),
"unix[%lu]"
,
ino
);
if
(
external_lookup_id
(
id
))
{
pr_debug
(
"Found ino %u in exception unix sk list
\n
"
,
(
unsigned
int
)
ino
);
return
true
;
}
return
ret
;
return
false
;
}
static
int
write_unix_entry
(
struct
unix_sk_desc
*
sk
)
...
...
@@ -1447,17 +1440,13 @@ static int resolve_unix_peers(void *unused)
int
unix_sk_id_add
(
ino_t
ino
)
{
struct
unix_sk_exception
*
unix_sk
;
/* TODO: validate inode here? */
char
*
e_str
;
unix_sk
=
xmalloc
(
sizeof
*
unix_sk
);
if
(
unix_sk
==
NULL
)
e_str
=
xmalloc
(
20
);
if
(
!
e_str
)
return
-
1
;
unix_sk
->
unix_sk_ino
=
ino
;
list_add_tail
(
&
unix_sk
->
unix_sk_list
,
&
opts
.
ext_unixsk_ids
);
return
0
;
snprintf
(
e_str
,
20
,
"unix[%lu]"
,
ino
);
return
add_external
(
e_str
);
}
int
unix_sk_ids_parse
(
char
*
optarg
)
...
...
images/rpc.proto
View file @
26529414
...
...
@@ -91,7 +91,7 @@ message criu_opts {
repeated
string
skip_mnt
=
31
;
repeated
string
enable_fs
=
32
;
repeated
unix_sk
unix_sk_ino
=
33
;
repeated
unix_sk
unix_sk_ino
=
33
;
/* DEPRECATED, use external instead */
optional
criu_cg_mode
manage_cgroups_mode
=
34
;
optional
uint32
ghost_limit
=
35
[
default
=
0x100000
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment