Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
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
Chen Yisong
lxc
Commits
e4203378
Commit
e4203378
authored
Jul 20, 2016
by
Christian Brauner
Committed by
GitHub
Jul 20, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1089 from tych0/ghost-limit
c/r: add support for ghost-limit in CRIU
parents
bafda6b6
b2b7b0d2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
criu.c
src/lxc/criu.c
+17
-0
lxccontainer.h
src/lxc/lxccontainer.h
+6
-0
No files found.
src/lxc/criu.c
View file @
e4203378
...
...
@@ -169,6 +169,10 @@ static void exec_criu(struct criu_opts *opts)
/* --force-irmap */
if
(
!
opts
->
user
->
preserves_inodes
)
static_args
++
;
/* --ghost-limit 1024 */
if
(
opts
->
user
->
ghost_limit
)
static_args
+=
2
;
}
else
if
(
strcmp
(
opts
->
action
,
"restore"
)
==
0
)
{
/* --root $(lxc_mount_point) --restore-detached
* --restore-sibling --pidfile $foo --cgroup-root $foo
...
...
@@ -300,6 +304,19 @@ static void exec_criu(struct criu_opts *opts)
if
(
!
opts
->
user
->
preserves_inodes
)
DECLARE_ARG
(
"--force-irmap"
);
if
(
opts
->
user
->
ghost_limit
)
{
char
ghost_limit
[
32
];
ret
=
sprintf
(
ghost_limit
,
"%lu"
,
opts
->
user
->
ghost_limit
);
if
(
ret
<
0
||
ret
>=
sizeof
(
ghost_limit
))
{
ERROR
(
"failed to print ghost limit %lu"
,
opts
->
user
->
ghost_limit
);
goto
err
;
}
DECLARE_ARG
(
"--ghost-limit"
);
DECLARE_ARG
(
ghost_limit
);
}
/* only for final dump */
if
(
strcmp
(
opts
->
action
,
"dump"
)
==
0
&&
!
opts
->
user
->
stop
)
DECLARE_ARG
(
"--leave-running"
);
...
...
src/lxc/lxccontainer.h
View file @
e4203378
...
...
@@ -902,6 +902,12 @@ struct migrate_opts {
* unconditionally disable this feature. In-flight connections are
* not fully established TCP connections: SYN, SYN-ACK */
bool
disable_skip_in_flight
;
/* This is the maximum file size for deleted files (which CRIU calls
* "ghost" files) that will be handled. 0 indicates the CRIU default,
* which at this time is 1MB.
*/
uint64_t
ghost_limit
;
};
/*!
...
...
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