-
Notifications
You must be signed in to change notification settings - Fork 599
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support criu-image-streamer through RPC #2533
Support criu-image-streamer through RPC #2533
Conversation
Programs calling CRIU through RPC may want access to image streaming for faster data transfer. To use image streaming through RPC, (1) criu-image-streamer must be started by the calling program. (2) The RPC call must enable stream in `criu_opts`. Signed-off-by: Liana Koleva <[email protected]>
147a50b
to
0f05b59
Compare
@@ -905,7 +901,7 @@ static int check(int sk, CriuOpts *req) | |||
__setproctitle("check --rpc"); | |||
|
|||
opts.mode = CR_CHECK; | |||
if (setup_opts_from_req(sk, req)) | |||
if (setup_opts_from_req(sk, req, -1)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to add a comment that explains why we use -1
here?
@@ -1015,7 +1011,7 @@ static int start_page_server_req(int sk, CriuOpts *req, bool daemon_mode) | |||
close(start_pipe[0]); | |||
|
|||
opts.mode = CR_PAGE_SERVER; | |||
if (setup_opts_from_req(sk, req)) | |||
if (setup_opts_from_req(sk, req, -1)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to add a similar comment here.
@lianakoleva Would it be possible to run tests for this functionality with ZDTM? For example, something similar to |
Parameter `int mode` conflicts with another variable in this function. Signed-off-by: Liana Koleva <[email protected]>
The `image_dir_mode` function was modified to base output on opts.mode only. This required changes to accommodate for CR_CPUINFO, which has a subcommand. Signed-off-by: Liana Koleva <[email protected]>
Programs calling CRIU through RPC may want access to image streaming
for faster data transfer.
To use image streaming through RPC,
(1) criu-image-streamer must be started by the calling program.
(2) The RPC call must enable stream in
criu_opts
.